stev379 Posted February 9, 2005 Posted February 9, 2005 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!
Domonoky Posted February 9, 2005 Posted February 9, 2005 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
stev379 Posted February 9, 2005 Author Posted February 9, 2005 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)
Domonoky Posted February 9, 2005 Posted February 9, 2005 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..
zeroZshadow Posted February 9, 2005 Posted February 9, 2005 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...
stev379 Posted February 9, 2005 Author Posted February 9, 2005 Domonoky, Thanks! The space was absolutely the problem. Works well now. Thanks again!
zeroZshadow Posted February 11, 2005 Posted February 11, 2005 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...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now