#151565 - 2005-11-15 06:58 PM
Re: kIX Rookie
|
Breezer12763
Lurker
Registered: 2005-11-15
Posts: 3
|
I am trying to get KIX to run in the back ground, (a timer if you will) and execute the following VB code every 45 seconds. This will be used to monitor a certain application that we are having issues with running. When the application dies, then it will send a smtp page to on-call engineers. I have very little experience with KIX and if I can incorporate both script's into one, that would be a bonus.
Thanks guys for your help
First KIX script; :LOOP SLEEP 10 Shell "C:\ProcessManager.vbs" GOTO "LOOP"
Second VB script; Dim strProcess
strProcess = ( "fcintsrv.exe" )
If( IsProcessRunning( strProcess ) = false ) Then WScript.Echo "Process " & strProcess & " is not running on computer " & strComputer End If Function IsProcessRunning( strProcess ) Dim Process, strObject IsProcessRunning = False strObject = "winmgmts://" & strServer For Each Process in GetObject( strObject ).InstancesOf( "win32_process" ) If UCase( Process.name ) = UCase( strProcess ) Then IsProcessRunning = True Exit Function End If Next End Function
Set oShell = CreateObject("WScript.Shell") oShell.Run "MAILSEND.EXE -s ""SoftWare Errors"" -to xxx@example.com -from ""@wksta@@example.com"" -msg ""FirstClass has experienced severe software issues. Please check immediatly"" -smtp smtp.server.com "
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 1607 anonymous users online.
|
|
|