My original vbs was intended to be more generic, that's why I didn't want to embed it in the vbs to start (and I wanted to be more cross platform) but I've modified it now to wait for the specific file to exist. Note this uses Wscript as I call it with cscript.exe to make it all nant friendly
Sample vbs code --------------- 'Wait for the log file to be created to know the installer is complete If CheckForFile( strLogFile, 20 ) Then WScript.Echo "File Found! " & strLogFile WScript.Quit 0 Else WScript.Echo "File Not Found - " & strLogFile & " Maximum Retries Exceeded" WScript.Quit 1 End If Function CheckForFile( strFile, intTimerSec ) ' Checks for the existance of a file Dim IntCounter,IntCounterMax, fso Set fso = CreateObject("Scripting.FileSystemObject") IntCounterMax = (600 / IntTimerSec) IntCounter = 0 CheckforFile = false Do If fso.FileExists(strFile) Then CheckForFile = True Exit Do End If IntCounter = IntCounter + 1 If intCounter <> intCounterMax Then WScript.Echo "File Not Found " & strFile & " - Sleeping " & IntTimerSec & " Seconds" Wscript.Sleep IntTimerSec * 1000 End If Loop until intCounter = intCounterMax End Function -----Original Message----- From: Brass Tilde [mailto:[EMAIL PROTECTED] Sent: Monday, November 10, 2008 9:32 AM To: nant-users@lists.sourceforge.net Subject: Re: [NAnt-users] Any way to do a while loop? > the installer directly. I'm launching the process remotely, which > requires my nant exec task to call a vbs script locally, and the vb code > starts the process on the remote machine. The vbs script does not wait > for the remote process started to complete before the vbs itself > completes. Any way you can make the vbs script either wait, or do wait/check for completion loop? That way, NAnt wouldn't have to. Brad ------------------------------------------------------------------------ - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users