reo_1963
Posts: 3
Joined: Tue Mar 25, 2014 3:12 pm

setting the "Run As Administrator" for Desktop Icon

I would like to have the "Run As Administrator" check boxes for the EXE associated in the "Application Shortcut Folder" and "Desktop"
checked when the installer I have made (using your very fine tool) finishes.
When the install completes, the Desktop icon does not have the "Run this program as an administrator" checkbox set in the "Priviledge Level"
of the "Compatibility" tab for the short cut properties. Nor does the "Start" menu shortcut item.

I'm using the Enterprise version of Advanced Installer on a 64 bit Windows 7 PC.
I run out an account with full Admin privs.

I have made a .NET Installer project for a ".NET 4.0 Client" application that is in 32 bit mode. The application itself does have a manifest that requires the program run to be run as an Administrator (or it won't run).
All the Op Sys checkboxes are checked (except for Win 2000).
In the "Install Parameters" page, the "Run as administrator" is checked.
In the "Files and Folders" page, in the "Application Shortcut Folder" and "Desktop" tree elements, both application EXE's have their Properties for "Run As Administrator" checked.
In the "Media" page, the "Package Type" is set to "Single EXE setup". The Archive radio button is set to "Archive installation files into CAB files"

The install itself is working. A single EXE file is made. All the files are going to the right place. The config file gets the correct stuff put into it. And my application does run. (yeah!)
I would just like to know if it is possible on Windows 7 to programatically set the checkbox for "Run this program as an administrator" for it's Dekstop Icon.
If so, what did I do wrong?
reo_1963
Posts: 3
Joined: Tue Mar 25, 2014 3:12 pm

Re: setting the "Run As Administrator" for Desktop Icon

My bad.
Did some more testing and the "Run as Administrator" checkbox is indeed getting set.
For a while yesterday it was not being set...
might have had something to do with I had set the folder the EXE was going into as "Do not overwrite existing files" ("Operations" tab)
as a way to save the CONFIG file when doing an Update.
I changed the EXE folder to "Overwrite only if the existing files are older" and now the checkbox for "Run as Administrator" gets set.
Cool.
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: setting the "Run As Administrator" for Desktop Icon

Hello and welcome to Advanced Installer forums,

I'm glad you got this working. In order to run a shortcut as an administrator, you can enable the Run as Administrator option from the Shortcut Properties Dialog.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
reo_1963
Posts: 3
Joined: Tue Mar 25, 2014 3:12 pm

Re: setting the "Run As Administrator" for Desktop Icon

Hi Dan. Yep, that is where I set the property for "Run As Administrator" for the desktop icon.

I just tried my installer on a Windows 8 laptop...
And the installer ran... and the program runs.
But it did not set the checkbox in the "Compatibility" tab for the "Run the program as an Administrator".
The program does run.

I performed a restart on the laptop, and the checkbox is still not set for the Desktop icon.

Has anyone reported this before?
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: setting the "Run As Administrator" for Desktop Icon

Hello,

When the Run as Administrator option is enabled in the Shortcut Properties Dialog, then the Run as administrator is enabled in the Advanced Properties of the shortcut.

Please take a look on the image below:
ShortCut properties.png
ShortCut properties.png (38.46 KiB) Viewed 9642 times
If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”