9

My machine is a 'server workstation' running Windows Server 2003 connected to a domain. I have created a local user called StandardUser.

I'm trying to run Internet Explorer 8 as this user by right-clicking on iexplore.exe in Windows Explorer but nothing happens. No processes containing the user's name appear in Task Manager (and it is set to show processes from all users). I've also checked that the Secondary Logon service is running although I'm not sure if there are any others required.

At the command line I've tried:

runas.exe /u:StandardUser "C:\Program Files\Internet Explorer\iexplore.exe"

and get

Attempting to start C:\Program Files\Internet Explorer\iexplore.exe as user "COMPUTERNAME\StandardUser" ...

but then the command prompt just returns and still nothing.

Any ideas?

Update: Yes I am being asked for a password. Also I am running as local administrator on the machine because I'm a developer and need to run as local admin for Visual Studio, plus that's the way my company set the machine up.

9
  • I don't have access here to Windows Server 2003 , so just an idea: Are you launching the runas with administrator permissions?
    – harrymc
    Sep 30, 2009 at 14:26
  • Doesn't it even as for a password?
    – monkey_p
    Sep 30, 2009 at 14:31
  • Do you need this for sites that use some Windows specific authentication? Or don't you trust the sites you're visiting?
    – Arjan
    Sep 30, 2009 at 15:11
  • @Arjan: It's to test how a web site behaves when logged in as a different user. Not about security or trust.
    – Alex Angas
    Sep 30, 2009 at 15:26
  • have you tried ShellRunAs? windowsreference.com/free-utilities/…
    – Molly7244
    Sep 30, 2009 at 15:29

8 Answers 8

10

It's to test how a web site behaves when logged in as a different user.

So actually you don't really need to run IE as a different user, you just need to log into the website as a different user?

(Instructions below were written looking at IE7 as I haven't got 8 handy here right now, but the relevant dialogs haven't changed significantly since IE5 as far as I can remember)

The easiest way to do this would be to just go into Internet Options -> Security. Then click on the icon for the zone that your website(s) are being detected as (it should show you which zone you're in on IE's status bar if you don't know) click Custom Level and scroll right to the bottom of the list.

You should see a section headed User Authentication -> Logon just select the Prompt for user name and password option, and you should then be prompted for which account you want to use the first time that you visit the website per session.

1
  • Thinking outside the box, nice one! Wish I could create my own IE security zone so that only certain sites used this.
    – Alex Angas
    Oct 1, 2009 at 10:07
3

If I recall correctly Windows Vista and above simply won't start Internet Explorer for another user in the same session unless Explorer (the file manager) is not running. I don't know if this is true for Windows Server 2003 as well.

You can kill Explorer and then start IE as another user (for example from a command line) and then restart Explorer when IE is running for that user.

If you attempt to switch to another user (runas/user:StandardUser cmd) and then start IE you will likely get the following result:


Internet Explorer

The RUNAS command is not supported.

OK

But it does work if you kill the Explorer task in task manager (End Process for explorer.exe). I just tried it.

Steps:

  1. Start cmd.exe (command prompt).

  2. Run "runas/user:StandardUser cmd" in the command line window started in step 1.

  3. End Process explorer.exe in Task Manager "Processes" tab.

  4. Run "C:\Program Files\Internet Explorer\iexplore.exe" in the command line window started for StandardUser in step 2.

  5. Start "Explorer" in "Applications" tab in Task Manager (via "New Task..." button).

2
  • I've tried this and still no luck, but thanks for your suggestion.
    – Alex Angas
    Oct 1, 2009 at 9:03
  • Make sure you really follow the instructions. It works! Oct 1, 2009 at 12:31
2

Anyhow, does runas work for other processes under that specific login? IE7+ generally do not like runas and it's not even supported under Vista+ what I know (not sure why but I'd guess it has with restricted mode to do - it pops up a dialog stating this when I try).

Enabling Explorer in general to launch each folder in a separate process might be related to your problem as iexplore might be part of the shell and if this option isn't enabled new instances will not be launched in a separate process?

Some tricks to test stuff out is doing runas for "cmd" and then launch whatever from the spawned cmd - processes from that one will generally inherit its owner. Or try giving an argument to IE like an url and try the runas /user:foo "start http://stackoverflow.com" for default browser launch...

3
  • Do you have a link to something on the MS site that says this is not supported? From the behaviour it seems possible.
    – Alex Angas
    Sep 30, 2009 at 15:00
  • Internet Explorer using components that are terribly tightly integrated into the OS, I think it's indeed hard to change users on the fly... (But: that's really just a feeling, not based on any actual experience.)
    – Arjan
    Sep 30, 2009 at 15:12
  • In Vista, if you have UAC on, keep the prompt for Credentials on, The try running an app with elevated permissions. There you will get a prompt asking for username & password. Enter any users credentials there. (Kinda runas)
    – Ganesh R.
    Sep 30, 2009 at 15:52
2

Summary

Runas might not be supported but you could use a freeware utility CPAU http://www.joeware.net/freetools/tools/cpau/index.htm

This utility will allow you to launch an application using a different set of credentials then the current user. The neat advantage with CPAU over runas is that you can specify both the username and password at runtime. With the runas command you'd first have to configure a cached credential or be prompted for password at each run.

Examples

Using CPAU to launch iexplore.exe you could use a statement like:

from cmd prompt:

cd <path to cpau> -d
cpau.exe  /u domain\username  /p 123456  /ex "c:\Program Files (x86)\Internet Explorer\iexplore.exe" /lwp

from powershell script:

cd <path to cpau> -d
invoke-expression "cpau.exe  /u 'domain\username'  /p '123456'  /ex 'c:\Program Files (x86)\Internet Explorer\iexplore.exe' /lwp"

/lwp means to Load With Profile, and can be replaced with /lwop Load Without Profile

0
1

I had the same issue , where the command didnt returned anything- so had removed the ".exe" and its working fine now :

(1) Launch the command prompt first (RUN > CMD )

(2) Then only paste in this command:

runas /user:USER_NAME@DOMAIN_NAME "C:\Program Files\Internet Explorer\IExplore.exe"

0
0

It's to test how a web site behaves when logged in as a different user.

So it's basically to test the web site, not the computer?

Then unless you're using Windows authentication, it might be much easier to add dummy domains to your hosts file, to allow for creating another browser session. For that, and other options, see How to Log Into a Web App Simultaneously with Different Account?

2
  • Unfortunately that isn't an option as the web site is bound by DNS entry not IP address. If I use the dummy domains then I can't reach the web site. But good idea, thanks for your suggestion.
    – Alex Angas
    Oct 1, 2009 at 9:05
  • There's more suggestions at that link. It still not clear to me if you need Windows authentication, but if not, then I'd continue at the question I mentioned above...
    – Arjan
    Oct 1, 2009 at 10:19
0

You could also hold down the SHIFT key and right-click on the Internet Explorer shortcut, then select the option to run as a different user.

0

for me resetting the IE setting resolved my problem.

just note that delete personal setting is not required and the user continue to run right after

I really mean it

You must log in to answer this question.

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