Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing "Run as Administrator" in VS Installer's Shortcut

I created a shortcut from the application .EXE in Visual Studio Installer, but the resulting shortcut did not have the option of "Run as Administrator" when I right-clicked the shortcut icon.

The application .EXE in Program Files does allow this option on right-click. If I created the shortcut manually from the .EXE (i.e. "Create Shortcut") instead of from the deployment, then the resulting shortcut also has that option.

How to a deploy an application in Visual Studio Installer to include a shortcut that has "Run as Administrator" option enabled on right-click?

like image 634
KMC Avatar asked Sep 06 '25 10:09

KMC


1 Answers

If you have a manifest, you can require to have administrator privilege, add the following to your manifest

<requestedExecutionLevel level="highestAvailable" uiAccess="false" />

see http://msdn.microsoft.com/en-us/library/bb756929.aspx

You can also run any filetype as administrator with the help of the registry, see http://www.howtogeek.com/howto/windows-vista/add-run-as-administrator-to-any-file-type-in-windows-vista/

like image 58
MLeblanc Avatar answered Sep 09 '25 19:09

MLeblanc