VB Script Help - TechRepublic
Question
November 18, 2008 at 07:40 PM
pakora_bandit

VB Script Help

by pakora_bandit . Updated 17 years, 8 months ago

Need some process monitoring script that when an application closes it kills a process on Win2k

Running Wireless card software called watcher.exe which is included in a shortcut. I’ll attach a script to it.

Once watcher.exe closes i need the script to kill a process called swiapimux.exe

I have this so far my Do Loop Aint Working :o(

strComputer = “.”
set wshshell = wscript.createobject(“wscript.shell”)
Set objWMIService = GetObject(“winmgmts:” _
& “{impersonationLevel=impersonate}!\\” & strComputer & “\root\cimv2”)
Set colwatcherProcess = objWMIService.ExecQuery _
(“SELECT * FROM Win32_Process WHERE Name = ‘watcher.exe'”)

Do

Loop until colwatcherprocess.count =0

wshshell.run “c:\winnt\system32\pskill swiapimux.exe”

wscript.echo”Process Killed

This discussion is locked

All Comments