Active X control on 32 and 64 bit - Advanced Installer Community
bchetana
Posts: 95
Joined: Sat Dec 01, 2012 11:36 am

Active X control on 32 and 64 bit

Hi

I have a setup build using AI 9.8. We have a activx control that is build in 32bit, the same code workes of 64 bit also. How can we use same DLL for both the bits. for 64bit office, [Organization-Attributes-64-bit componemt] should be checked and for 32bit office this should be unchecked. How can we do this dymanically at run time. Is it possible to use the same dll in this way.?
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Active X control on 32 and 64 bit

Hello,

In order to achieve that you can duplicate the related component where the .DLL is by using a drag-and-drop operation while the SHIFT key is pressed. If the related component where the .DLL is in the “32-bit” feature just drag-and-drop into the “64 bit” feature while the SHIFT key is pressed.

Please let us know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bchetana
Posts: 95
Joined: Sat Dec 01, 2012 11:36 am

Re: Active X control on 32 and 64 bit

hi

This should depnd on the office bit. I have a custom action which will determine the office bit installed in the machine before instaltion
This is conditions on IS_OFFICE_64 = "x64" or IS_OFFICE_64 = "x86."

In the approch which you have suggested, if I put the condition on condition tab, its getting reflected on both the DLLS. Please see the screes from bellow attachments
Attachments
ScreenHunter_03 Sep. 23 15.09.gif
ScreenHunter_03 Sep. 23 15.09.gif (34.68 KiB) Viewed 10464 times
ScreenHunter_02 Sep. 23 15.08.gif
ScreenHunter_02 Sep. 23 15.08.gif (14.71 KiB) Viewed 10464 times
ScreenHunter_01 Sep. 23 15.08.gif
ScreenHunter_01 Sep. 23 15.08.gif (12.41 KiB) Viewed 10464 times
bchetana
Posts: 95
Joined: Sat Dec 01, 2012 11:36 am

Re: Active X control on 32 and 64 bit

Any Update.... Its very urgrnt can any one help me on this
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Active X control on 32 and 64 bit

Hello,

Can you please go in the “Files and Folders” page, create a new sub-folder under the folder where your .DLL is added and, then using a drag-and-drop operation while the SHIFT key is pressed duplicate your DLL under the new created sub-folder. Also, please enable the "Install folder content into the parent folder" option for the new created sub-folder.

Please note that the two .DLLs will be added in the same component. In order to separate them you can create a “dummy” component and move one of the .DLL in that component. Then you can add component according to the desired feature(32-bit/ 64-bit). In order to create a “dummy” component here is what you should do:
Go to the "Registry" page and create a dummy key (i.e. My_Key1) using [New Key] toolbar button. Here create a dummy registry (i.e My_registry1) using [New Value] toolbar button.

Please let us know if that helped otherwise give us more details about your specific scenario.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bchetana
Posts: 95
Joined: Sat Dec 01, 2012 11:36 am

Re: Active X control on 32 and 64 bit

Ya I tryed this way but, my problem is ,, I want to achive this by keeping "registration synchronization is enabled". I reqied this for auto upgreade.. Please See my thread bellow for the same. How Can I achive this?????

http://www.advancedinstaller.com/forums ... =2&t=23605
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Active X control on 32 and 64 bit

Hello,

As a workaround for your scenario you can try to add the related DLL file under the "Common" feature (it will be installed on both 32 and 64-bit OSs). Also, you should enable the "64-bit Component" option for the DLL component and for all components of its extracted registration registries. In this way the DLL will be installed in a 64-bit location on 64-bit systems and in a 32-bit location on 32-bit systems. Also, its extracted registration registries will be installed as 32-bit registries on 32-bit systems and as 64-bit registries on 64-bit systems (will not be redirected under 32-bit registry section on 64-bit systems).

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bchetana
Posts: 95
Joined: Sat Dec 01, 2012 11:36 am

Re: Active X control on 32 and 64 bit

is this correct??? please see the pic bellow.

If I do this way, The Dll is not registerd in GAC in 32bit.

And one more thing, I need to register this dll based on office bit. this Dll has to register as 32bit dll for 32bit office(Even in 64 bit os) and as 64bit dll for 64bit office. how can I condiction on this???
Attachments
ScreenHunter_05 Sep. 26 22.02.gif
ScreenHunter_05 Sep. 26 22.02.gif (19.49 KiB) Viewed 10412 times
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Active X control on 32 and 64 bit

Hello,

As another approach you can try to add your DLL in a merge module which will install and register the DLL as a 32-bit DLL based on specific condition. Next you can add the DLL in your main installation project and configure it to be installed and registered as a 64-bit DLL based on specific condition and, then add the merge module to your main project.

Also, you can enable the registration synchronization option for DLL files from your merge module and main installation project. In the main project you should also add a pre-build event which will build the merge module project.

Here are the steps to proceed:
- create a merge module project and in "Files and Folders" page add the DLL file
- check its "Auto register file (DLL, OCX, etc)" option with the synchronization enabled
- go to "Organization" page, select the DLL component and from its context menu choose "Configurable -> Condition" option
- from "Edit Substitution Parameter" dialog add a new parameter like this:
  • Name: DLLComponentCondition
    Display Name: DLL Component Condition
    Description:
    Type: Text
    Default Value: IS_OFFICE_64 = "x86"
- open your main project and in "Files and Folders" page add the DLL file
- check its "Auto register file (DLL, OCX, etc)" option with the synchronization enabled
- go to "Organization" page, drag the DLL component under "Common" feature, enable its "64-bit component" option and in the "Condition" field use a condition like this:
  • IS_OFFICE_64 = "x64"
- go to "Merge Modules" page and add the above merge module into your main project
- in the "Configure Merge Module" dialog select your "Common" feature
- go to "Media -> Build Events" tab and add a pre-build event which will build the MSM project

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bchetana
Posts: 95
Joined: Sat Dec 01, 2012 11:36 am

Re: Active X control on 32 and 64 bit

Thnq for help...
Will test and let you konw.. Thnq

Return to “Common Problems”