aeplengg
Posts: 76
Joined: Mon May 05, 2014 5:31 am

Set Compatibility mode for VB6 exe at install

Hello

Our install package includes vb6 exe's. My Application works fine under Windows XP. But on other OS I need Administrator Rights to start it.
I can solve it while give this right by editing the compatibility mode as 'Run as administrator' and 'compatibility mode for windows xp'.

I need the installer to set the compatibility mode for these executables.

How can I give this Right while do the Installation with the Advanced Installer.
The user should not do this manually.

Regards,
Swati
Attachments
Compatibility.png
Compatibility.png (24.71 KiB) Viewed 23536 times
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Set Compatibility mode for VB6 exe at install

Hi Swati,

I'm afraid that we do not have predefined support for this, however you can achieve what you want by going in the "Registry" page of your project and creating the registry entries described in the following thread: http://stackoverflow.com/a/2739459/3715084

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
aeplengg
Posts: 76
Joined: Mon May 05, 2014 5:31 am

Re: Set Compatibility mode for VB6 exe at install

Hello,

In continuation with the above, if I create registry entry to set compatibility mode, then it wont appear on Windows 7, 8(64 bit).
Is there any way to set compatibility of exe using custom action?

Regards,
Swati
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Set Compatibility mode for VB6 exe at install

Hi Swati,
In continuation with the above, if I create registry entry to set compatibility mode, then it wont appear on Windows 7, 8(64 bit).
I'm afraid I do not fully understand this. Can you please give me more details (maybe exemplify)?
Is there any way to set compatibility of exe using custom action?
Unfortunately, I'm not aware of such a custom action. Maybe you can find some examples on the internet, so you can create your own custom action.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
aeplengg
Posts: 76
Joined: Mon May 05, 2014 5:31 am

Re: Set Compatibility mode for VB6 exe at install

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 :roll: and takes more time to add key :cry: ).
This creates the false registry entry(added 'Microsoft' key with all child keys) on other PC if I installed set-up with above settings. :oops:

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
Attachments
Compatibility set
Compatibility set
Compatibity set.PNG (75.52 KiB) Viewed 20568 times
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Set Compatibility mode for VB6 exe at install

Hi Swati,

I tested the scenario and I found that the compatibility mode options are set correctly if you create your registry entry under the following key: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

I attached a test AIP file that sets some compatibility mode options for the "updater.exe" file, so you can test it (it works on Windows 7 64-bit, too).

Best regards,
Eusebiu
Attachments
Set Compatibility Mode.aip
(15.33 KiB) Downloaded 1141 times
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
aeplengg
Posts: 76
Joined: Mon May 05, 2014 5:31 am

Re: Set Compatibility mode for VB6 exe at install

Hello

Oops!! There is a version mismatch of AIP file. I am using AI 11.4.1.
Whether it works on windows 8, 8.1??

regards
Swati
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Set Compatibility mode for VB6 exe at install

Hi Swati,

I attached a project created with Advanced Installer 11.4. And yes, it works on Windows 8 and 8.1, too.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
aeplengg
Posts: 76
Joined: Mon May 05, 2014 5:31 am

Re: Set Compatibility mode for VB6 exe at install

Hello

Attachment with V11.4 AIP file is missing.

regards
Swati
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Set Compatibility mode for VB6 exe at install

Sorry, it seems that I forgot to attach it.

Best regards,
Eusebiu
Attachments
Set Compatibility Mode.aip
(15.65 KiB) Downloaded 1348 times
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
aeplengg
Posts: 76
Joined: Mon May 05, 2014 5:31 am

Re: Set Compatibility mode for VB6 exe at install

Hello

I want to set compatibility mode for HKEY_LOCAL_MACHINE and not for HKEY_CURRENT_USER

regards
Swati
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Set Compatibility mode for VB6 exe at install

Hi Swati,

I'm not sure how this can be achieved. Please note that even when you set the compatibility mode manually, in the "Compatibility" tab of the file's properties, the registry key is automatically created per-user, not per-machine.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
aeplengg
Posts: 76
Joined: Mon May 05, 2014 5:31 am

Re: Set Compatibility mode for VB6 exe at install

Hi

If I set compatibility for all users manually, then the registry key is created for per-machine.
Please find attached for reference.

regards
Swati
Attachments
Compatibility for all users.png
Compatibility for all users.png (61.82 KiB) Viewed 20543 times
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Set Compatibility mode for VB6 exe at install

Hi,

For this you can simply create the registry entry under the following path: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
aeplengg
Posts: 76
Joined: Mon May 05, 2014 5:31 am

Re: Set Compatibility mode for VB6 exe at install

Hello

I have tested my AI set-up on Windows 7(32 bit, 64 bit), windows 8(32 bit, 64 bit) OS.

It works fine on 32 bit OS. It creates key 'Layers'(if not exists) in 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags' and sets application compatibility mode. If I manually check the exe, then it shows the 'compatibility for all users'.

If I installed this setup on 64 bit OS, then it creates key 'Layers'(if not exists) in 'HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AppCompatFlags' and sets application compatibility mode. If I manually check the exe, then it does not shows the 'compatibility for all users'.
Now if I manually set the compatibility mode of exe, then it will appear in 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers'.
How do I set the registry settings in AIP file so that it can set compatibility mode key in 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers'?

Find the attached Test AIP project for reference.

regards
Swati
Attachments
Compatibilty Test.zip
(855.41 KiB) Downloaded 1318 times

Return to “Feature Requests”