shinscreen Posted July 29, 2005 Share Posted July 29, 2005 I am working on my HTA menu and have a button that I want to use to reboot the PC. However, I cannot get shutdown.exe to work. I am using PE 2005 with Server 2003 SP1. Is there any other way to tell PE to reboot. I am starting my HTA with the startnet.cmd and am killing pskill.exe smss.exepskill.exe winlogon.exeso that I can exit the startnet.cmd without it rebooting.Ideas? Link to comment Share on other sites More sharing options...
Jazkal Posted July 29, 2005 Share Posted July 29, 2005 I leave the startnet.cmd window in the background behind my HTA app. And my reboot button closes the HTA, and sends "exit" to the CMD window, then WinPE reboots.Here is the HTA code for the reboot button I'm using:Sub reboot_onclick() Ret = Msgbox("Are you sure you wish to reboot the PC?", vbYesNo) If ret = vbNo then Exit Sub End if Do Do While Counter < 5 Counter = Counter + 1 If Counter = 6 Then Check = False Exit Do End If with createobject("wscript.shell") .AppActivate ("X") .sendkeys "exit" .sendkeys "~" self.close end with Loop Loop Until Check = False End sub Link to comment Share on other sites More sharing options...
n00dles Posted July 30, 2005 Share Posted July 30, 2005 I do exactly the same thing at the end of my preinstallation script... good ol sendkeys! Link to comment Share on other sites More sharing options...
gadget Posted July 30, 2005 Share Posted July 30, 2005 I use the attached peshutdown. Has switches to sutdown, force shutdown, reboot etc.run peshutdown /?peshutdown.exe Link to comment Share on other sites More sharing options...
shinscreen Posted August 1, 2005 Author Share Posted August 1, 2005 Excellent. This is perfect. Thanks alot gadget! Link to comment Share on other sites More sharing options...
grantericstrong Posted August 14, 2007 Share Posted August 14, 2007 Perfect gadget, just what the doctor ordered. Link to comment Share on other sites More sharing options...
ordan Posted September 3, 2008 Share Posted September 3, 2008 (edited) -- blp -- Edited September 3, 2008 by ordan Link to comment Share on other sites More sharing options...
WreX Posted September 3, 2008 Share Posted September 3, 2008 I don't know about 2005, but with PE 2.x you can just issue the integrated "wpeutil shutdown" or "wpeutil reboot" commands. No need for any 3rd party utilities. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now