Run Internet Explorer as different user
I'm using the following code in order to run Internet explorer as a different user.
set objShell= CreateObject("WScript.Shell")
Set objNetwork = CreateObject("WScript.Network")
''Variable Values assignment
domain = objNetwork.ComputerName
program = "iexplore.exe"
domainUser = "XXX"
password = "123456"
objShell.Run "runas /env /user:" & domain & "\" & domainUser & " " & """C:\Program Files\Internet Explorer\iexplore.exe"""
The Thing is that the CMD is being opened and I can see the domain and user, but the Password isn't being typed. neither automatically nor manually.
I'll be glad to get some help.
It may be a typo. I do not see you first entering the username.
sorry for the newbie question. what's a typo? (type?)
Originally Posted by bklabel1
domainUser is actually the variable for user.
typo is an abbreviation for typographical error... typing something other than what you mean, usually by accidentally pressing a wrong key.
I may not be remembering correctly. But I did not think qtp/uft was able to support programs running as a different user as it did not have access.