1

This should be simple, but after hours of search and trying I can't do it. I want (via a job, task, batch or code) Internet Explorer to open a web page in admin mode.

The page I am opening is my own creation. It requires elevated access because it runs some javascript browser automation that won't work otherwise.

FYI, the page works fine when I manually run IE in admin mode. It is an admin page I created that copies data from fram A to frame B where A and B have different sub domains. Admin mode allows me to get around the domain of origin issues.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Tom McDonald
  • 1,532
  • 2
  • 18
  • 37

2 Answers2

1

Check How to run an application as "run as administrator" from the command prompt? for how to run applications as administrator from the command line.

You'll need to do something like runas.exe /user:administrator "path to HTML file" or runas.exe /user:administrator "path to IE" "path to HTML file".

Community
  • 1
  • 1
IMTheNachoMan
  • 5,343
  • 5
  • 40
  • 89
  • Unfortunately Admin Mode doesn't work that way. Using your suggestion, IE opens the web page, but IE isn't in Admin Mode, i.e., it doesn't have elevated privledges. This makes perfect sense if you think about it. if you're the Administrator (user) you can open IE, but that doesn't make it open in Admin Mode (IE specific mode of operation). – Tom McDonald Jul 13 '15 at 14:42
0

Getting around UAC is tricky. I found this article which was the answer. Basically you have to set up a Windows Task to Launch IE without the UAC command prompt.

get around UAC

Tom McDonald
  • 1,532
  • 2
  • 18
  • 37
  • BTW, Nacho's method will work if you turn off UAC, put the command in a bat file, run the batch and persist the credentials using /savecred switch. Thereafter you aren't prompted for credentials. Its not an ideal solution, but it can be made to work. http://superuser.com/questions/521278/how-do-i-add-a-password-to-a-batch-file-to-automatically-authenticate http://windows.microsoft.com/en-us/windows/turn-user-account-control-on-off#1TC=windows-7 – Tom McDonald Jul 13 '15 at 16:25