Ich persönlich würde es z.B. in dieser Art machen:
Code:
Set WShell = WScript.CreateObject("WScript.Shell")
Set WMI = GetObject ("winmgmts:")
strGoLabelExe = "notepad.exe"
strHTTP = "http://meineseite"
If not CheckGoLabel(strGoLabelExe) then
Wshell.Run strGoLabelExe,2
wscript.sleep 2000 '2 Sekunden warten
End If
If CheckGoLabel(strGoLabelExe) then
Wshell.Run strHTTP,3
Else
Wscript.Echo "GoLabel Software nicht funktionsbereit. Bitte kontaktieren Sie Ihren Administrator!"
End If
Function CheckGoLabel(varProg)
Set GoRun = WMI.ExecQuery("select * from win32_process where name='" & varProg & "' ")
If GoRun.Count then CheckGoLabel = true else CheckGoLabel = false
End Function
Edit: M.E. sind in Deiner Version zu viele überflüssige Subs drin
