A few simple questions

Can someone explain to me what -q does?

As in:

 
  system("xx %xx%\\xx\\xx -q"); 


Also I've seen people use:

 
system("%SystemRoot%\\system32\\shutdown.exe -s -f -t 00");


Wouldn't it be easier to just do system("shutdown" -s -f -t 00"); and get the same effect?
Can someone explain to me what -q does?
Depends on command. Type <command> /? in command line to get haelp

Wouldn't it be easier to just do system("shutdown" -s -f -t 00"); and get the same effect?

In theory it might help to avoid running files having a nam "shutdown" and placed at the same folder where your program is.
That is not a C++ question.

Q. What does parameter '-q' does for program 'xx'?
A. Read the manual of 'xx'.

Q. Why "%SystemRoot%\\system32\\shutdown.exe" instead of "shutdown"?
A. To ensure that the specific program is called and not just the first with that name that is found from the path.
keskiverto thank you for answering the 2nd question.

For the first, i've seen -q in people's code.

The x's I put were just a place holder for the real code that was there.

I was just wondering what -q does.

Is it like "quit" or what.

Like sysem("shutdown" -s -t 00") the -s is shutdown and the -t is the time before it is executed.
Topic archived. No new replies allowed.