Monday, July 27, 2009

How to make it reboot the machine?

Hi im currently creating a program and for it to work I need it to reboot after the user clicks Yes but I dont know what the code would be to make it reboot the machice.


Im using Microsoft Visual C++ 2005 Express Edition.


Please give me the code or a direct link not a whole website.

How to make it reboot the machine?
why not just make life easier and prompt the user to manually restart there computer for the changes to take effect.


I find it damned annoying as a software user if a program automatically reboots my system.


you willl endf up with happier end users and your life in coding a little easier, and may be more sales from word of mouth if done correctly.
Reply:You can use the following statement:


WinExec ("RUNDLL32.EXE shell32,SHExitWindowsEx 2", SW_SHOWNORMAL);





Thanks,


Gabriel Topala


http://www.gtopala.com


No comments:

Post a Comment