doestergaard Posted September 25, 2013 Share Posted September 25, 2013 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 selectend subThanks in advance Link to comment Share on other sites More sharing options...
Tripredacus Posted September 27, 2013 Share Posted September 27, 2013 So I guess your code is closing the CMD huh? Is your VBScript being run from the startnet.cmd? Link to comment Share on other sites More sharing options...
allen2 Posted September 28, 2013 Share Posted September 28, 2013 Cmd alone should also close. You might need to run cmd /k if you want to keep the cmd windows open. Link to comment Share on other sites More sharing options...
doestergaard Posted September 29, 2013 Author Share Posted September 29, 2013 (edited) Thank you for your replies. Haven't had any luck with it yet. Im using Winpeshl.ini to execute mshta and the OSDLoader.htaIt 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, falseself.close()The OSDGui.hta opens up fine but closes again immediately after self.close() from OSDLoader.hta is being executed and WinPE reboots Thanks again! /Daniel Edited September 29, 2013 by doestergaard Link to comment Share on other sites More sharing options...
Tripredacus Posted September 30, 2013 Share Posted September 30, 2013 I did this once, but after the image was complete I show a messagebox asking to reboot. Read up this thread:http://www.msfn.org/board/topic/134164-how-to-delay-part-of-a-function/ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now