cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
microstar
Level 5

Shortcut that Runs as Administrator

Does anyone know if I can predefine a shortcut that runs a program as administrator in Windows Vista??
Labels (1)
0 Kudos
(5) Replies
SaintBernard
Level 4

Look here http://community.macrovision.com/showpost.php?p=393434&postcount=1

The app that you need to launch using the shortcut should also have an the requiredExecutionLevel set to Administrator in it's manifest. This will prompt the permission elevation dialog when you click the shortcut.

Now I need more info on a manifest.

So look here http://windowsvistablog.com/blogs/windowsvista/archive/2007/01/25/accessible-uac-prompts.aspx
0 Kudos
Kelter
Level 10

A user can configure any Start menu shortcut to run as an administrator from the Compatibility tab in the Properties page for that shortcut. This setting causes the system to request privilege elevation upon clickign the shortcut, regardless of whether or not the executable was built with a manifest to require elevation. If this setting is available for a shortcut, then it should be settable programatically. If it is settable programatically, there should be a way to do so either with MSI attributes, or with reg entries or some system call.

Does anybody know about any of the above?

Thanks.
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

I ran across a post once on an MSDN forum about how to set this through IShellLinkDataList. There's nothing you can put in an MSI table for it, though. In general the best bet is to set it in the manifest if at all possible.
0 Kudos
Kelter
Level 10

For some reason, this seems to make our tools not run on XP...or maybe development was just trying to push this responsiblity on the release guy. 😄


I'll look at IShelLinkDataList, and post the solution if i find one.

Thanks again, Michael!
0 Kudos
microstar
Level 5

thanks for all your comments. I meant the shortcut without any manifest, but I understand there really is not any property I can use.
0 Kudos