vbscript - Get user's input and run command line -


when paste username in box, script open command line , run command user's information.

strinput = inputbox("prompt") dim oshell set oshell = wscript.createobject ("wscript.shell") oshell.run "cmd net1 user &inputbox /domain"  set oshell = nothing 

i have tried above, doesn't seem work. please me out.

you want use /k switch, tells cmd execute command listed. in addition, need pull strinput variable out of quotes:

strinput = inputbox("prompt") dim oshell set oshell = wscript.createobject ("wscript.shell") oshell.run "cmd /k net1 user " & strinput & " /domain"  set oshell = nothing 

Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -