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
Post a Comment