UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Run Excel As An Administrator From The Command Line, Office 2007    
 
   
dflak
post Mar 6 2012, 12:50 PM
Post #1

Utter Access VIP
Posts: 3,548
From: North Carolina



Windows 7 here.

I figured out how to create a shortcut that allows me to right click it and run excel as an adiminstrator.

The issue is if you want Excel to run any other office program it has to run as administrator otherwise it does not have the necessary "clout" to run the program.

Specifically, I want to use excel to run a browser. If I open excel as the administrator and then navigate to the file I want to run, it will run. If I run without administrator rights, I get an error message. "Automation error - the interface is unknown." Although it does open the browser to the correct URL. However it doesn't even attempt to log in.

Now I want to schedule this job to run in the middle of the night. So I put it in the Windows Scheduler. However even though you need administrator rights to run the scehduler, it does not run any of the programs it calls as the aministrartor. These scripts and programs do not seem to inherit the scheulder's rights.

I essentially need a command line flag to tell excel that it should open as administrator. I can't right click and navigate like I do manually.

I have a feeling that I am asking for the impossible. The existence of such a flag would be a serious security gap. This seems to be a situation where we are protected from ourselves as well as the big bad wolves.
Go to the top of the page
 
+
Doug Steele
post Mar 6 2012, 01:08 PM
Post #2

UtterAccess VIP
Posts: 17,607
From: Don Mills, ON (Canada)



Yes, you are asking for the impossible. (IMG:style_emoticons/default/grin.gif)

Create a shortcut to the Excel executable.

Right-click on the shortcut and select Properties. On the Shortcut tab, click on Advanced, and check the Run as Administrator box.



Go to the top of the page
 
+
arnelgp
post Mar 6 2012, 01:09 PM
Post #3

UtterAccess Ruler
Posts: 1,090



UAC, perhaps.
Go to the top of the page
 
+
dflak
post Mar 6 2012, 01:12 PM
Post #4

Utter Access VIP
Posts: 3,548
From: North Carolina



Thanks Doug. But if I want to run it at 2 AM my fingers will have to be on the keyboard here at work instead of snug under the covers attached to a sleeping body at home. I was trying to figure out a way to use the scheudler. Alas, the scheduler doesn't seem to have a "Run as administrator" option, although I do admit, I've only just started playing with it.
Go to the top of the page
 
+
dflak
post Mar 6 2012, 01:19 PM
Post #5

Utter Access VIP
Posts: 3,548
From: North Carolina



Yeah, sure. No sooner than I type the words "Windows 7 Scheduler" than an idea hits me to google whether it can run tasks as administrator. It turns out it can. On my small screen I missed the check box that says "Run with highest privileges."

Thanks for chiming in nonetheless.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 18th May 2013 - 10:38 AM