volkanos Posted November 15, 2010 Share Posted November 15, 2010 How to use variable with RunWait and COMSPEC ?? Example (I know psexec request a password if I don't use -p passwd (It's for the example)): $iPasswd = InputBox("Admin password", "", "", "*") RunWait(@COMSPEC & ' /c psexec @NetworkScan.txt -u Administrateur -p $iPasswd -i -d -e cmd "/C net user etudiant $iPasswd"') How to say that $iPasswd is a variable?? Link to comment Share on other sites More sharing options...
ZacUSNYR Posted November 15, 2010 Share Posted November 15, 2010 (edited) RunWait(@COMSPEC & ' /c psexec @NetworkScan.txt -u Administrateur -p ' & $iPasswd & ' -i -d -e cmd "/C net user etudiant' & $iPasswd & '"') Close quotes and use & between variables/txt Edited November 15, 2010 by ZacUSNYR Link to comment Share on other sites More sharing options...
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