English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

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.

2006-12-28 05:15:06 · 2 answers · asked by sbraidley 3 in Computers & Internet Programming & Design

I mean when the user clicks No not yes.

2006-12-28 05:15:42 · update #1

2 answers

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.

2006-12-28 05:24:21 · answer #1 · answered by Anonymous · 0 0

You can use the following statement:
WinExec ("RUNDLL32.EXE shell32,SHExitWindowsEx 2", SW_SHOWNORMAL);

Thanks,
Gabriel Topala
http://www.gtopala.com

2006-12-28 05:26:29 · answer #2 · answered by gtopala 4 · 2 0

fedest.com, questions and answers