vbscript - RunAs username from variable -


i writing script run ie different user. @ beginning script displays input, , use value input username.

option explicit dim input, europe  input = inputbox("please type mailbox name")  europe = "europe\" & input   dim oshell set oshell= wscript.createobject("wscript.shell") oshell.run "runas /profile /user:" & europe &  "c:\program files\internet explorer\iexplore.exe" wscript.sleep 100 oshell.sendkeys input oshell.sendkeys "{enter}" wscript.quit 

as can see username on domain europe\ , password same username.

so username should europe\ & input, , password & input

i have trouble getting string variable , passing shell command.

ok, managed that. if want put string variable username need put this:

oshell.run "runas /profile /user:" & europe &" ""c:\program files\internet explorer\iexplore.exe 

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -