ASPExec ExecuteWinAppAndWait Test

<% Set Executor = Server.CreateObject("ASPExec.Execute") rem *********************************************** rem * I'm not feeling very original tonight so rem * let's just execute notepad and then close it rem * out to verify the Wait portion works... rem *********************************************** Executor.Application = "notepad.exe" Executor.Parameters = "c:\autoexec.bat" Executor.TimeOut = 9000 Response.Write "Attempting to execute " & Executor.Application & "
" rem results of this method are the results of GetLastError intResult = Executor.ExecuteWinAppAndWait if intResult = 0 then Response.Write "Execution successful" else Response.Write "The result of this call was: " & intResult end if %>