I've had a script running on Win2k server for quite a while, it doesn't seem to function on Win2k3. I'm not sure if it is a permissions issue or differences on platforms. The script basically counts how many processess of a certain app are running and terminates all but 1 one of them. It's a long story of why we are doing this, needless to say, this is the only thing that I could come up with to appease the powers that be.
here is the part that is terminating the process
any thoughts why this won't kill the strCorelProcess?
here is the part that is terminating the process
Code:
'// if SARTActive = false, close all but one corel
If SARTActive = False AND intCorelCount > 1 Then
For Each Process In strObject.InstancesOf("Win32_Process")
If UCase(Process.Name) = UCase(strCorelProcess) AND intCorelCount > 1 Then
intCorelCount = intCorelCount - 1
Process.Terminate
End If
Next
End If
any thoughts why this won't kill the strCorelProcess?