Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 

Sign in to follow this  
doestergaard

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 :)

Share this post


Link to post
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

Share this post


Link to post
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

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×