0

Hi. I am trying to make a program that will launch restricted user-specified programs at my school. How would I make the system() function below make use of the two variables in it.
I've tried && and ||, but the bugger wont work.

#define runasc "runas /profile /user:tsc\\staffuser"

system( runasc programc );

programc is whatever the user enters earlier in the program.

Thanks in advance.

3
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by Nick Evan
0

I'm not sure if this is what you mean but:

#include <iostream>
[....]
std::string programc = "something";
std::string total = "";

total += runasc;
total += programc ; 
system(total.c_str());
[...]

[edit] Too slow [/edit]

Edited by Nick Evan: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.