Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

shutdown function

Status
Not open for further replies.

hughLg

Programmer
Feb 18, 2002
136
MY
i'm using Windows XP, when i shut down the computer by access Start button, my computer will be shut down and turn off the whole power of my system.

i want to create a program to do this same thing, so in my function, i do this:

Code:
{
   system("shutdown -s -f");
   /* or system("shutdown -s -f -t 01") to shutdown after 1 second. */
}

this'll shutdown my computer, but the power is not turn off entirely, there's still a message wait for me to press the power button at my CPU. the message is something like "It's safe to turn off your computer now".

any idea?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top