Internet Explorer 8 "Run with different credentials" shortcut - batch script option?

9,542

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:
9,542

Related videos on Youtube

Oli_G
Author by

Oli_G

Updated on September 18, 2022

Comments

  • Oli_G
    Oli_G over 1 year

    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 "www.google.com""
    

    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 "www.google.com"" -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?

    • Austin T French
      Austin T French over 10 years
      Powershell is installed with Windows 7 by default... Did your org remove it for some weird reason?
    • Oli_G
      Oli_G over 10 years
      Sorry I forgot to mention than some machines still runs on windows XP... Conversion project to win 7 is in progress.
  • Oli_G
    Oli_G over 10 years
    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!