Running application eh, Windows 2000 Server you say eh ? Coming right up:


Break On


$Process = "Services.Exe" ; What to look for


$Hostname = "@WKSTA" ; Where to look for it


$WMI = GetObject("winmgmts:{impersonationLevel=impersonate}!//$hostname")


$Collection = $WMI.ExecQuery('Select * from Win32_Process Where Name = "$Process"')


If $Collection.Count
?"Found running instance(s) of $Process on $Hostname"
For Each $Process in $Collection
?"Process = " $Process.Name " ThreadCount = " $Process.ThreadCount
Next
Endif


$WMI = 0


Exit 1

Im just funning - there are lots of examples of this stuff on the board here ... hope this helps your cause my friend !

-Shawn

[ 09 January 2002: Message edited by: Shawn ]