InstallShield Tips and Techniques

October 26, 2015

How to make shortcuts RunAsAdministrator and run in Compatibility Mode

Filed under: Reference Materials — shieldmaster @ 11:36 pm

 

I had a client request that their application shortcuts to be enabled to have the checkbox “Run this program as an Administrator” and also to have the checkbox for “Run this program in Compatibility mode for WinXP” – as shown here:

I started doing research and found out that all roads were pointing towards having a Manifest XML document created for each application executable. Well, that seemed like it was going to be too much work… So I setup a test VM machine, and altered the shortcut properties. I exported the HKCU and HKLM registry hives before and after the change, and found out that an entry in the HKCU registry hive was made when I altered the shortcut. My example shows the WinXP SP3 compatability setting – but if you modify a shortcut for Windows 7 – you can observe another registry change. The value “WINXPSP3” changes to “WIN7RTM”.

Note: For WinXP Operating Systems (yes Virginia, they are still out there…), the compatibility setting is “WIN2000“.

 

[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]

“c:\Program Files (x86)\SQLFinancials\SQLAP\SQLAP.exe”=”WINXPSP3 RUNADMIN”

Since it elevate the actual application executable, the elevation works for both desktop shortcuts as well as Program shortcuts. Obviously this will work for just the user that installed the software, but it solves the problem for 99% of my client’s needs.

ShieldMaster

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: