Jump to content

Recommended Posts

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)

Link to post
Share on other sites


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..

Link to post
Share on other sites

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...
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...