| |
careytech
Posts: 3
Score: 0
Joined: 8/9/2007
Status: offline
|
Folks, I'm a newbie so I ask for your patience firstly. I'm trying to create a script that will check for a folder, if it doesn't exist run an install, sleep and loop until it has finished Then Echo "Finished". There's a lot more I've done that works, but I can't get the sleep to work - Any Ideas? Option Explicit Dim WshFS, WshShell, oExec Dim strSourcePath 'On Error Resume Next Set WshFS = WScript.CreateObject ("Scripting.FileSystemObject") Set WshShell = WScript.CreateObject("WScript.Shell") strSourcePath = Left(WScript.ScriptFullName, Len(WScript.ScriptFullName) - Len(WScript.ScriptName)) If Not WshFS.FolderExists("c:\program files\Early Years Maths Pack") Then Set oExec = WshShell.Exec (strSourcePath & "Maths\setup1.exe /s") Do While oExec.Status = 0 WScript.Sleep 100 Loop Wscript.Echo "Finished" End If
|
|