Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to run an IE shortcut, as another user and starting a specific site. With the following Target command line:

C:\Windows\System32\runas.exe /user:Domain\Account@Domain "C:\Program Files (x86)\Internet Explorer\iexplore.exe"

I get a cmd password window, that after logon will start IE ad domain admin. With the following target commandline:

"C:\Program Files (x86)\Internet Explorer\iexplore.exe" http://www.google.com

I get IE starting as standarduser and on the specific site.

Now for my obvious question

  1. How can i incoperate the two. The target commandline:

C:\Windows\System32\runas.exe /user:domain\user@domain "C:\Program Files (x86)\Internet Explorer\iexplore.exe" www.google.com

Will not work :( Appriciate any answer or ideas

// Peter

share|improve this question

1 Answer 1

This is a bit tricky. With your current command line you've passed www.google.com as a parameter to runas. To get it to notice it as being part of the command line, you'll have to add quotes and escape the ones around the path. Also note that you can pick one of two user/domain notations, not both at once!

C:\Windows\System32\runas.exe /user:domain\user "\"C:\Program Files (x86)\Internet Explorer\iexplore.exe\" www.google.com"

This will cause the final parameters to stick together (runas will receive them as one parameter rather than two).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.