Reset to computer
-
Can anybody tell me a function that resets the computer?
36. When you surround an army, leave an outlet free. ... Do not press a desperate foe too hard. SUN-TZU - Art of War
Resets it to what?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
-
Can anybody tell me a function that resets the computer?
36. When you surround an army, leave an outlet free. ... Do not press a desperate foe too hard. SUN-TZU - Art of War
Try it :) : shutdown -r[^]
virtual void BeHappy() = 0;
-
Resets it to what?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
-
I mean to restart the computer, like pressing start -> Turn off computer -> Restart
36. When you surround an army, leave an outlet free. ... Do not press a desperate foe too hard. SUN-TZU - Art of War
Try
ExitWindowsEx(EWX_REBOOT)
."One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
-
Can anybody tell me a function that resets the computer?
36. When you surround an army, leave an outlet free. ... Do not press a desperate foe too hard. SUN-TZU - Art of War
As someone else already suggested, you can use the command "shutdown -r" which will run just as though you used it through command prompt. An example:
void main()
{
system("shutdown -r");
}This will default to a 30 second timer before the computer begins to shutdown. With some effort, you should be able to find a way to decrease the timer, although I'm not positive. EDIT: system("shutdown -r -t 10"); that will set the shutdown timer to 10 seconds, instead of the default 30. The command shutdown tells the computer what to do, "-r" is for resetting the computer, "-t xx" (-t 10) sets the time to the amount of seconds you indicate, so if your code were "system("shutdown -r -t 1");" The computer would start resetting one second after your program executes that line of code. Theoretically you can set it to 0 seconds, but I don't feel like testing that one ;P
-
Try
ExitWindowsEx(EWX_REBOOT)
."One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
-
Try it :) : shutdown -r[^]
virtual void BeHappy() = 0;
-
As someone else already suggested, you can use the command "shutdown -r" which will run just as though you used it through command prompt. An example:
void main()
{
system("shutdown -r");
}This will default to a 30 second timer before the computer begins to shutdown. With some effort, you should be able to find a way to decrease the timer, although I'm not positive. EDIT: system("shutdown -r -t 10"); that will set the shutdown timer to 10 seconds, instead of the default 30. The command shutdown tells the computer what to do, "-r" is for resetting the computer, "-t xx" (-t 10) sets the time to the amount of seconds you indicate, so if your code were "system("shutdown -r -t 1");" The computer would start resetting one second after your program executes that line of code. Theoretically you can set it to 0 seconds, but I don't feel like testing that one ;P