JDMils
Posts: 50
Joined: Tue Aug 10, 2010 12:42 pm

Install DLL depending on OS architecture x86/x64

I have a setup where I need to install a 3rd party DLL. There are two DLLs:

* Red86.dll
* Red64.dll

I need to register Red86.dll if the target OS is x86. I need to register Red64.dll if the target OS is x64.

How do I achieve this in AI? Thanks.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Install DLL depending on OS architecture x86/x64

Hi,

How are you registering the files? Conditioning them based on the platform type depends a lot on the registration method.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
JDMils
Posts: 50
Joined: Tue Aug 10, 2010 12:42 pm

Re: Install DLL depending on OS architecture x86/x64

I added both DLLs to Files and Folders, then in Organisation\Product\Main Feature:

* Right-click Red86.dll, set Condition to "NOT VersionNT64".
* Right-click Red64.dll, set Condition to "VersionNT64".

Should I set the properties of both DLLs to Auto-Register-File?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Install DLL depending on OS architecture x86/x64

Hi,

I was referring to the registration method. How are you registering them? For example, the Registration tab in Edit file dialog offers 3 registration methods. You can also use custom actions. I need to know which method you are using for your DLLs before I can make a recommendation for conditioning them.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
JDMils
Posts: 50
Joined: Tue Aug 10, 2010 12:42 pm

Re: Install DLL depending on OS architecture x86/x64

Normally I select Self Register native Library and thus did so again in this case.

I'm assuming that since I have conditions set in the Organisation section for x86 & x64, one of the DLLs will be installed to the target file system. Then, since both files are set to self-register, one of them will install and then self register. That's my logic. Do you concurr?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Install DLL depending on OS architecture x86/x64

Hi,

Yes, each DLL will be registered only if it's installed. If you use the conditions you mentioned, only one of them will be installed and registered based on the platform type. If you would have used the other registration options, you would have had to condition the extracted registry entries.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”