Hi,
I think you can create a REG_SZ registry value under the following keys (
per-user):
Code: Select all
HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
(or
per-machine):
Code: Select all
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
specifying the "Value" name as the full path of the executable and the "Data" field can be set to one of:
Code: Select all
WIN95 WIN98 NT4SP5 WIN2000 WINXPSP2 WINSRV03SP1
Additionally, depending on the operating system, you can also append one or more of the following (space separated, values supported in Vista):
Code: Select all
256COLOR 640X480 DIASBLETHEMES DISABLEDWM HIGHDPIAWARE RUNASADMIN
For instance, "RUNASADMIN" will enable the program to require elevation in Vista when it is launched through the shortcut.
An example project is attached. Look in the Registry page under the HKLM hive - you can drag-and-drop the whole registry branch starting with "Microsoft" under HKCU so that the settings are made per-user.
In the Organization page you can set a Condition for the "AppCompatReg" Component (for instance, use
VersionNT64 such that the registry entry is created only on 64-bit Windows).
Hope this helps.
Regards,
Ionut
FOLLOW US
Get the latest news in Application Packaging