doestergaard Posted September 25, 2013 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
Tripredacus Posted September 27, 2013 Posted September 27, 2013 So I guess your code is closing the CMD huh? Is your VBScript being run from the startnet.cmd?
allen2 Posted September 28, 2013 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.
doestergaard Posted September 29, 2013 Author 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
Tripredacus Posted September 30, 2013 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/
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