G
Guest
I'm trying to enumerate the local accounts on my XP Workstation with the
following code. The goal is to integrate additional code that will look for
a particular account and disable it. When I run this code in a VBS file, it
appears to be spending a long, long time generating the collection of
accounts. My registry impersonation level is set to 3 and I'm running the
script in the context of a domain account that is a local administrator.
Set oUserAccounts = GetObject("winmgmts:").InstancesOf ("Win32_UserAccount")
For Each Account in oUserAccounts
WScript.Echo Account.Name
Next
following code. The goal is to integrate additional code that will look for
a particular account and disable it. When I run this code in a VBS file, it
appears to be spending a long, long time generating the collection of
accounts. My registry impersonation level is set to 3 and I'm running the
script in the context of a domain account that is a local administrator.
Set oUserAccounts = GetObject("winmgmts:").InstancesOf ("Win32_UserAccount")
For Each Account in oUserAccounts
WScript.Echo Account.Name
Next