I would prefer to capture the EXIT CODE in a variable.
I'm slightly modifying JOSH's script as below:
'==========================================
dim filesys, i
dim WSHShell
Set filesys = CreateObject("Scripting.FileSystemObject")
Set WSHShell = WScript.CreateObject("WScript.Shell")
i = 0
i = SCHEDULE JOB 1 [WSHShell.Run]
'Execute JOB2 if EXIT CODE of JOB1 is 0
If i = 0 Then
i = SCHEDULE JOB 2 [WSHShell.Run]
If i = 0 Then
'Execute JOB3 if EXIT CODE of JOB2 is 0
i = SCHEDULE JOB 3 [WSHShell.Run]
else
WSHShell.quit(i)
End if
else
WSHShell.quit(i)
End If
'==========================================
Above script is not the complete script. Just to show how the logic will be. Let me know if you need any assistance.
Thanks,
Eshwar