ales.hrodek
Posts: 65
Joined: Mon Jun 11, 2012 11:40 am

Check registry on 64bit OS issue

I need install SQL Server if specific instance does not exists on target machine but only if use wants. This works well on 32bit OS but does not on 64bit OS (installer is 32 only)

Current solution:
1) Custom Behavior - Extended Search - Registry key does not exist "HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL\INSTANCE_NAME"
2) Dialog "show if" is set to result of search
3) Prerequisite condition is Registry value exists "HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL\INSTANCE_NAME" and "use 64bit locations" is set

Note:
There is another prerequisite for 32 bit OS but it works.

Problem I'm facing are:
1)
a/ Extended Search does not support "use 64bit locations"
b/ I can replace Extended Search by Search location Registry. Because I don't want install SQL Server if specific instance is present in 32 or 64 bit I must create 2 sets of Search (one with "use 64bit locations" and one without). It would be nice to have also opnit to add two Registry locations into one Search or have option to both "use 64bit and 32bit locations"

2)
Because currently there are two results after change described above I just extend condition to "RESULT32 or RESULT64"

3)
Same issue like in 1) but in this case I cannot find solution (work around). It's not possible set two same conditions with different "use 64bit locations". Again I suggest third option "use 64bit and 32bit locations". Another nice to have solution could be allow Search result in prerequicite conditions.

Could you help me now or must I wait for some future version?


Additionaly I checked my problem "http://www.advancedinstaller.com/forums ... =5&t=28917" in latest 12.1 version and it's still present. Could you do anything with it. Registry key must not be version specific! I must remember to edit Registry in Table Editor everytime I create installer with "Override Windows Installer programs list entry"
pfletch101
Posts: 24
Joined: Sat Aug 18, 2012 9:19 pm

Re: Check registry on 64bit OS issue

If you want to do more complicated Registry searches than AI readily supports, you may be able to do them in a custom VBS script and return a Property indicating the result. I have an application that needs to know what (if any) version of Microsoft Office is installed and whether it is 32-bit or 64-bit - something that Microsoft makes unbelievably difficult to determine - and I use a VBS script to look at the relevant bits of the 32-bit and 64-bit Registries and set appropriate Properties.
ales.hrodek
Posts: 65
Joined: Mon Jun 11, 2012 11:40 am

Re: Check registry on 64bit OS issue

Hi,

Your solution does not solve my problem. Generally I avoid vbs because there could be problem execute them on some server installations. My suggestion is use own custom action dll. Anyway, search is not complicated and I can do it in AI. I just do not understand why Search the 64-bit portion of the registry is not suported in Extendex Search. I also note nice to have feature to search in both locations. Now I can do two searches and then test two result properties or even set third property based on value of results and test this one later.

As you can see problem is not set some property. I don't know how to use this property in Prerequisites. Because Prerequisites does not support criteria "if property value is" I am forced to use "registy value exists". And here is catch. Install conditions in Prerequisites does not allow set Use 64-bit locations when evaluating conditions on a 64-bit machine per registry path. Setting affect all conditions.

I need set conditions based on property (does not mater if set by search, vbs or custom dll) or allow set 64bit location per condition. Is there any way how to do that?
Daniel
Posts: 8239
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Check registry on 64bit OS issue

Hello Ales,

First of all I apologize for my delayed reply. This week we had a release and we were a bit more busy.
1)
a/ Extended Search does not support "use 64bit locations"
This improvement is already on our TODO list and hopefully will be available in a future version of AI. I'm afraid I cannot give you any estimate date for this, but as soon as the improvement will be available we will update this thread.
b/ I can replace Extended Search by Search location Registry. Because I don't want install SQL Server if specific instance is present in 32 or 64 bit I must create 2 sets of Search (one with "use 64bit locations" and one without). It would be nice to have also opnit to add two Registry locations into one Search or have option to both "use 64bit and 32bit locations"
Thank you for your suggestion, but as long as you can overcome this by using two searches we want to avoid adding another search option. We try to keep the AI UI as simple and plain as possible to get an improved UX. Thank you for your understanding in this matter.
3)
Same issue like in 1) but in this case I cannot find solution (work around). It's not possible set two same conditions with different "use 64bit locations". Again I suggest third option "use 64bit and 32bit locations". Another nice to have solution could be allow Search result in prerequicite conditions.
As a workaround for this you can add your prerequisite as a feature-based prerequisite and configure its install condition to always install. Then you can add the related searches in "Search" page and use their associated properties to condition the prerequisite associated feature from "Organization" page. In this way the prerequisite will be installed only based on the search results added in "Search" page.
Additionaly I checked my problem "http://www.advancedinstaller.com/forums ... =5&t=28917" in latest 12.1 version and it's still present. Could you do anything with it. Registry key must not be version specific! I must remember to edit Registry in Table Editor everytime I create installer with "Override Windows Installer programs list entry"
You can see my reply in the "Record left behind in "Control Panel - Programs"" thread.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”