Hello
I have checked this with too many ways.
Way 1: I have created registry entry 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers'. In which I have added exe compatibility settings. Please find attachment for reference.
The set-up with above setting, works OK with my PC windows 7(32 bit). It sets the compatibility mode of 'AxPORT.exe'.
When I installed this set-up on windows 7(64 bit), then it does not show any compatibility mode for 'AxPORT.exe'.
Way 2. I have added existing registry entry of 'Microsoft' in my registry settings. It adds all the registry of 'Microsoft' (it includes all the child keys under Microsoft key

and takes more time to add key

).
This creates the false registry entry(added 'Microsoft' key with all child keys) on other PC if I installed set-up with above settings.
Way 3: I have created batch file with entry 'REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "C:\ASCADA\AxPORT.exe" /t REG_SZ /d "WINXPSP3 RUNASADMIN" /f'. I have added custom action to run this batch file.
This works ok if my APPDIR is 'c:\ASCADA'.
If user selects other path to install set-up, then above fails to execute. For this I want custom action to execute such condition.
Any other way to check compatibility?
Regards
Swati