Jump to content

Help needed with VPScript: window.close() terminates cmd.exe in WinPE?


Recommended Posts

Does anybody know why this happens? I know that WinPE shutdown when you close startcmd, but how can i leave cmd.exe open so it does not shutdown WinPE?

Heres my code:

case 4

oShell.Run("%WINDIR%\System32\cmd.exe")

document.parentwindow.close()

end select

end sub

Thanks in advance :)

Link to comment
Share on other sites


Thank you for your replies. Haven't had any luck with it yet. Im using Winpeshl.ini to execute mshta and the OSDLoader.hta

It terminates all windows when i tell the script to open the new window. Here is my code for OSDLoader.hta which after initializing the system will execute:

oShell.Run "%WINDIR%\System32\cmd /k cd X:\ & %WINDIR%\OSD\OSDGui.hta", 1, false

self.close()

The OSDGui.hta opens up fine but closes again immediately after self.close() from OSDLoader.hta is being executed and WinPE reboots :huh:

Thanks again! :)

/Daniel

Edited by doestergaard
Link to comment
Share on other sites

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