×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Configure IE Explorer to Always Run As Another User

Configure IE Explorer to Always Run As Another User

Configure IE Explorer to Always Run As Another User

(OP)
I have IE and 98% of the time I need to go to web site that requires me to log in as another user. Instead of constantly entering the alternate user/password, I'd like to configure IE so I can start it automatically as the other user. I'm aware of right-clicking the IE icon and choosing "Run as..." but I would like to avoid this too and configure it once to run as the other user whenever I start it.

Is there a way to do this?
Thanks...

RE: Configure IE Explorer to Always Run As Another User

You can create a batch file that will start IE using the runas command.  Save it to your desktop or sompelace convenient.  Then just double click to open IE with the other user credentials.

CODE

runas /savecred /user:username "C:\Program Files\Internet Explorer\iexplore.exe"
Change username to whatever is appropriate.  The first time that you run it, you'll need to enter the password for that alternate user account.  A word of caution however- using the /savecred option is a potential security problem that you should consider depending on your circumstances.  Once you do this, any other 'runas' commands using the /savecred option and that username will use the previously saved credentials.  So if someone were to get access to that computer & run the command runas /savecred /user:username regedit.exe using the correct alternate username, no password prompt would be required.  If you're OK with that possibility, then that should do it.  

RE: Configure IE Explorer to Always Run As Another User

(OP)
smah,

Thanks very much -- works great. Just one more question. I configured my home page in IE to be the site I want to go to (the one I use most of the time). For some reason when I use the bat file, it takes me to the other site.

Is there an additional parameter I can pass that specifies the site that I want displayed when IE starts?

Steve

RE: Configure IE Explorer to Always Run As Another User

Normally, a command line way to start IE & have it open to some particular site, you'd just add the url as a parameter to the program like:

CODE

"C:\Program Files\Internet Explorer\iexplore.exe" http://www.tek-tips.com
Adding this method to the runas command above to run as a different user gives us:

CODE

runas /savecred /user:username "C:\Program Files\Internet Explorer\iexplore.exe" http://www.tek-tips.com
Sometimes, there seems to be problems when adding additional parameters like this with the runas command.  Test it & see.  If it doesn't work, there is another way around.

RE: Configure IE Explorer to Always Run As Another User

(OP)
smah
I tried adding the url, but it does not work. What is the way around you mentioned?

thanks very much

RE: Configure IE Explorer to Always Run As Another User

That's what I figured.  Sometimes it works; sometimes not.  Anyway, the workaround is simply daisy chaining 2 batch files.  The first would be simply to open IE with the required url.  This could be saved anywhere on the computer (in the root of C: for example).

CODE --> openpage.bat

"C:\Program Files\Internet Explorer\iexplore.exe" http://www.tek-tips.com
Then, create a batch file using the runas command to change to the other user.  This is the one that would be on the desktop (or wherever convienient).  Instead of having this load IE directly, have it load the first batch file.

CODE --> specialie.bat

runas /savecred /user:username C:\openpage.bat

RE: Configure IE Explorer to Always Run As Another User

(OP)
Thanks.

I created the two batch files and configured them with my information. However, when I run the specialie.bat, I still get a dialog that prompts me for user name and password.

The dialog has a "Remember my password" checkbox, but when I check it and try the batch file again, I'm still prompted for password.

Any ideas?

RE: Configure IE Explorer to Always Run As Another User

are you sure the /savecred switch is correct and the username?  If the username has a space, put quotation marks around it.  As mentioned earlier- when using the /savecred switch, you should only be prompted for the password once.

I just tested the above & it works fine for me.  However, I did notice one thing that I didn't mention.  The 'specialie.bat' file must be located somewhere in the path that is accessible by the new user (the one specified in 'openpage.bat').  The file will not be accessible if it's anywhere in the current user's profile or any other place that the new user account doesn't have access to.

RE: Configure IE Explorer to Always Run As Another User

(OP)
I double checked the username and it is correct. It is in a different domain than the domain for the current user. Would that make a difference?

Also, I put both bat files in a folder within C:\Program Files. Is that correct?

 

RE: Configure IE Explorer to Always Run As Another User

I would expect it to work with an alternate domain, but I don't have a way to test it.  Hopefully for the /user switch, you used something like /user:user@domain or /user:domain\user.

I would stay away from the Program Files directory (at least until after successful testing).  The Program Files directory sometimes has some strange behavior concerning user permissions.

RE: Configure IE Explorer to Always Run As Another User

(OP)
smah,

Thanks for all your time on this. I specified user with the following:
/user:domain\user

I moved the folder containing the two bat files so it is in the C:\ directory, but I get the same behavior.

I'm not sure why it's not working, but I think it's time to move on, unless you have any other ideas.

Thanks again.

 

RE: Configure IE Explorer to Always Run As Another User

I have to admit that I'm out of ideas.  I wonder why you're seeing this behavior.  I have to suspect that it's related to the changing of domains.  Just for fun, do you have another user account on the same domain to test with?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close