Jump to content
Sign in to follow this  
AllSystemGo

Username question

Recommended Posts

AllSystemGo

Hey guys,

I'm trying to create a script that get all the User from a computer. I know that @UserName get the current user but how can I get all the users??? And is there a way to delete a user like it would do if I would go in the Windows Management and delete the user from there, not just deleting the folder in Document and Settings

Cheers

Share this post


Link to post
Share on other sites
ksmith247

I am far from an expert but the only way I can think of to do something like that would be to equate the user name to the user SID in the registry. Perhaps there is some ADSI script out there that will take a user SID and look it up on a DC and return the friendly user name. You could try the Windows 2000 Scripting Guide from Microsoft.

There could be something to remove user profiles in Microsoft's Script-o-Matic tool. The cool thing about that one is it has been rewritten in AutoIt. Of cource it is still available in it's original format too (though the AutoIt version is more l337) :rolleyes:


Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size]

Share this post


Link to post
Share on other sites
AllSystemGo

Thank you for your advice. I'll take a look into it! If anyone has any other way feel free to share it!!

Cheers

Share this post


Link to post
Share on other sites
PACaleala

Study the output for theese commands:

net user /?

net localgroup "Administrators"

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  

×