Shell command under Win7/64

fra

Registered User.
Local time
Today, 19:03
Joined
Nov 12, 2012
Messages
12
Hi,
I need to start an (open source) program from Access 10.
Unfortunately, this program only opens and runs when "started as administrator" - no problem with the desktop link, where I can add this feature. In Access, however, the standard program call (Shell("...exe",1)) fails. Is there a possibility to add the administrator feature in the VBA code or, perhaps, call the primed Windows desktop link in VBA?
Fritz
 
Is there a possibility to add the administrator feature in the VBA code or, perhaps, call the primed Windows desktop link in VBA?

Are you looking for RunAs? That should be able to be placed in front of the executable name in Shell.

Also to note, Shell is roughly equivalent to Fork on *nix platforms. It does not wait for the started program to complete before the VBA code continues.
 
Thank you, Michael.
Shell "runas /user:administrator ""C:\Program Files (x86)\.......exe""" produces a cmd-window prompting to input the administrator password. This appears to be one way of doing it, but in an even more inconvenient manner than the dirty solution (minimize Access, double-click the program's desktop icon).
If there is no simple way to start the program via a button and the on_click procedure, not much is lost.
Fritz
 
Shell "runas /user:administrator ""C:\Program Files (x86)\.......exe""" produces a cmd-window prompting to input the administrator password. This appears to be one way of doing it
...
If there is no simple way to start the program via a button and the on_click procedure, not much is lost.

That is the command line equivalent of Right clicking the program icon \ RunAs Administrator. Via the GUI you must ack the security popup box, via the command line you must enter the password. That was the GUI way you were starting the program, correct? Or did I misunderstand?

'tis what Mac was poking fun at Windows Vista about in their TV ads: "Hello I am a Mac. Hello I am a PC. (PC, do you really want to reply? Yes.)" ;)
 
That was the GUI way you were starting the program, correct?
No, in the extended properties of the desktop link icon, I can select "run as administrator" and I do not have to do anything else but double-click the icon.
Fritz
 
Michael,
beautiful - I can now directly call the desktop icon and open the program as designed! Thank you very much!
Fritz
 

Users who are viewing this thread

Back
Top Bottom