Sign in to follow this  
Followers 0
Newbie123

Script to remove unwanted local users

2 posts in this topic

the following VBscript gets me to the list of Local Users on a windows 2000 PC.

I need to find out how to continue in order to delete a given particular user, member of the "users group".

Here's what I have so far:

' Require Variants to be declared before used

Option Explicit

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

' Declare Variables & Objects

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Dim oShell

Dim oAutoIt

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

' Initialise Variables & Objects

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Set oShell = WScript.CreateObject("WScript.Shell")

Set oAutoIt = WScript.CreateObject("AutoItX3.Control")

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

' Start of Script

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

oShell.run "mmc.exe c:\winnt\system32\COMPMGMT.MSC"

wscript.sleep 500

oAutoIt.Send "L"

oAutoIt.Send "{Tab}"

wscript.sleep 500

oAutoIt.Send "G"

oAutoIt.Send "{Enter}"

wscript.sleep 500

oAutoIt.Send "A"

wscript.sleep 500

oAutoIt.Send "{Down 5}"

oAutoIt.Send "{Enter}"

thanks for any help

I'll check for an answer tomorrow.

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0