Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Internet Explorer 8, combined with Windows 7, offer the possibility to open IE by specifying which user account will be used for security. This can be done by shift right clicking the IE shortcut and selecting "Run with different credentials". This option then opens a windows message-box asking for a username and password that will be used as credentials in the instance of IE.

My question is: Is it possible to create an IE shortcut that will pop this windows message-box and ask for credentials at every opening?

To put you in context, we have generic security usernames that are used on some specific laptops who do not require login at startup. Those accounts have limited access, but sometimes the person using those accounts needs to consult a website that requires higher privileges. We want the user to be able to login to IE with a different account to access the website without logging off Windows.

So far, I have tried using a .bat to get username and then use runas.exe:

set INPUT=
set /P INPUT=Username: %=%
C:\Windows\System32\runas.exe /user:myDomain\%INPUT% "C:\Program Files (x86)\Internet Explorer\iexplore.exe """

But this option opens a console and I would like to get the windows messagebox...

I also tried with PowerShell:

Start-Process -FilePath "C:\Program Files (x86)\Internet Explorer\iexplore.exe """ -Credential (Get-Credential)

But this option required PowerShell on every laptop (many) and the users must specify the Domain to login which is not an option...

How can I simply get the windows security messagebox to pop up?

share|improve this question
Powershell is installed with Windows 7 by default... Did your org remove it for some weird reason? – AthomSfere Nov 12 '13 at 18:55
Sorry I forgot to mention than some machines still runs on windows XP... Conversion project to win 7 is in progress. – Oli_G Nov 14 '13 at 14:20
up vote 0 down vote accepted

If you don't mind using a utility, check out ShellRunAs from Microsoft, it does what you're looking for:

The command-line Runas utility is handy for launching programs under different accounts, but it’s not convenient if you’re a heavy Explorer user. ShellRunas provides functionality similar to that of Runas to launch programs as a different user via a convenient shell context-menu entry.

share|improve this answer
I did came across ShellRunAs in my research but discarded this option as it needs to insert this utility on all machines. Your answer convinced me to give it a try, and It sure does what I want. I now need to add this tool in the next machine core update... Thanks! – Oli_G Nov 14 '13 at 14:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .