Jump to content
Sign in to follow this  
stev379

Local user password

Recommended Posts

stev379

How can a password be changed for a local user in W2k/XP with AutoIT?

The user is a member of the local administrators group.

Thanks!

Share this post


Link to post
Share on other sites
Domonoky

Hi..

Imho you could change the userpassword with the console, with the command "net user". If you type "net help user" into console, you get the help..

..this command would be easy to use in Autoit..

mfg Domonoky

Share this post


Link to post
Share on other sites
stev379

I'd like to pass a password from an inputbox. The example below gives no errors, but doesn't change the users password.

How can I pass the input password variable into the script?

$UsrPW = InputBox("Enter new password", "Enter a new password to set for local user USER.", "", "*")

Run("net user markf" & $UsrPW)

Share this post


Link to post
Share on other sites
Domonoky

Hi..

the best way to solve such problems, is.. make a msgbox which displays the complete string you want to run.. so you see if there are errors.

for your problem, i suspect a missing space, because you concatenate "net user markf" with $UsrPW which will result to: "net user markfpassword (no space !! )

so change it to:

Run("net user markf " & $UsrPW)       ;note the added space

mfg Domonoky..

Share this post


Link to post
Share on other sites
zeroZshadow

i would change markf to @username or to a inputbox, because else it would only work for you.


*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...

Share this post


Link to post
Share on other sites
stev379

Domonoky,

Thanks! The space was absolutely the problem.

Works well now.

Thanks again!

Share this post


Link to post
Share on other sites
zeroZshadow

or you could just run this

run("RunDLL32.EXE shell32.dll,Control_RunDLL nusrmgr.cpl")

RunDLL32.EXE shell32.dll,Control_RunDLL nusrmgr.cpl


*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...

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  

×