| |
jgoodwin
Posts: 2
Score: 0
Joined: 7/17/2004
From: USA
Status: offline
|
Hi - I thought this would be easy, but haven't been able to find a way to log a disconnected user off of an XP system that uses fast user switching. I tried terminating explorer.exe using the following code, but this does not end their session (nor even kill explorer). set processes = getobject("winmgmts://").InstancesOf("Win32_Process") for each process in processes if process.name = "explorer.exe" then If process.GetOwner ( User, Domain ) = 0 Then If User <> "Josh" Then Wscript.Echo "Terminate Process " & Process.Caption & " belonging to " & Domain & "\" & User process.terminate end if end if end if Any ideas? Josh
|
|