PDA

View Full Version : Run as shortcut IE, different credentials



JForce
May 10 2011, 07:30:07 AM
For testing a web-based system, a guy I worked with set up a number of shortcuts that when run, would open IE as a particular user, including the password, and go to a particular URL.

These have disappeared, and I'm having trouble recreating them.

An example - I have a shortcut to "C:\Program Files\Internet Explorer\iexplore.exe"

Pretty easily, I can hold shift, select run-as, and enter credentials.

Alternatively, I can create a shortcut with %windir%\system32\runas.exe /u:UAT15 "C:\Program Files\Internet Explorer\iexplore.exe" which will run-as for me, with the user UAT15, and prompt for password, but for some reason the command window that asks for the password won't recognise text and it rejects the password each time.

I recall that the shortcut previously was seamless - it had the password in it as well as the username (as I'd update it in the shortcut when it changed) but I can't seem to get it right when I add a <p:XXX> string to the shortcut for the password.

Similarly, I can't get it to open to a specific URL either.

Thoughts? Assistance? Jokes?

JForce
May 11 2011, 01:07:37 AM
USELESS BASTARDS

LoudSpeakly
May 11 2011, 11:11:35 AM
To launch a specific URL, put the string after iexplore.exe. In the shortcut encase the whole thing in quotes.

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

Does manually using Run-As give the required result? Presumably, the ability to log in to your site as the person specified? Is UAT15 a local machine account, domain account, or website account?

smagd
May 11 2011, 11:42:51 AM
As far as I can tell, the built-in RUNAS.EXE (sensibly) does not provide a command line parameter for the password.

The simpler solution is to use a Third-Party RUNAS.EXE that'll blissfully ignore above security concerns in a windows 3.1 compliant manner , e. g. Steel RunAs (http://www.steelsonic.com/steelrunas.htm). Google will provide a few alternatives if this one doesn't cut it, and you could try searching the machine's hard disk for already installed versions that were used in the deleted shortcuts.

More correctly, you could try to set up Once-Only Tasks in the Task Scheduler (http://www.sevenforums.com/tutorials/11949-elevated-program-shortcut-without-uac-prompt-create.html) for another account. You can start Task Scheduler jobs with a regular shortcut without giving a plaintext password in it.