Jump to content

Restart WINPE


shinscreen

Recommended Posts

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.exe

pskill.exe winlogon.exe

so that I can exit the startnet.cmd without it rebooting.

Ideas?

Link to comment
Share on other sites


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

  • 2 years later...
  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...