MAVERICKS CHOICE Posted April 25, 2006 Share Posted April 25, 2006 Bit late in the post but I can confirm if interested? Sleep.exe can certainly use three digits eg Sleep 120CheersMC. Link to comment Share on other sites More sharing options...
Klintan Posted April 26, 2006 Share Posted April 26, 2006 HiI've the same problem with some installers. You start with a setup.exe and after a short wile you get the command prompt back again and the installer is still running (This because the installer have created another process and ended the original). My solution is more general.Create a script that monitors a installer process. Then create a batch script like this.Example from when installing MSDN@setup.exe@Cscript wait.vbs 001msdn.exe--wait.vbs---Option Explicit'On Error Resume NextDim bCheck, quitCode, colItems, objItem, objWMIService, strComputer, sArg1strComputer = "."If WScript.Arguments.Count > 0 Then sArg1 = WScript.Arguments(0)Else WScript.Echo "Enter <program.exe> as parameter" WScript.Quit 1End IfSet objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")WScript.Sleep 5000quitCode = 2 'No program.exe foundDo bCheck = False Set colItems = objWMIService.ExecQuery("Select * from Win32_Process Where Caption='" & LCase(sArg1) & "'",,48) For Each objItem in colItems quitCode = 0 bCheck = True WScript.Sleep 1000 Exit For NextLoop While bCheckWScript.Quit quitCode---- Link to comment Share on other sites More sharing options...
muiz Posted May 4, 2006 Share Posted May 4, 2006 How do i use sleep.exe from RunOnce ? Link to comment Share on other sites More sharing options...
ajua Posted May 4, 2006 Share Posted May 4, 2006 How do i use sleep.exe from RunOnce ?you have two options for using sleep.exe in runonceex:1) copy it to system32 and just call it sleep.exe XX in your cmd files2) use it along with your setup files are and call it as above, but you have to have sleep.exe where every cmd file is. Link to comment Share on other sites More sharing options...
CoffeeFiend Posted November 14, 2008 Share Posted November 14, 2008 (edited) [edit] post before mine just got deleted, please delete this one too... Edited November 14, 2008 by crahak 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