Use a search result in another search - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Phobos
Posts: 85
Joined: Fri Sep 08, 2006 11:52 am
Location: Germany

Use a search result in another search

Hi,

In my current project I search for several registry keys. Now some of my searches depend on the result of another search. For example, one search is called "RSINSTANCE" which is then used in another search:

Key: Software\Microsoft\Microsoft SQL Server\[RSINSTANCE]\Setup
Name: SQLPath


This is working fine so far. However, I have a search called "INSTANCE" which I also want to use for another search:

Key: Software\Microsoft\Microsoft SQL Server\Instance Names\RS
Name: [INSTANCE]


Unfortunately this does not work. Any idea?
Thanks!
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

Please make sure that the "INSTANCE" search is scheduled before the search that he use it.

Also please make sure that the result of the "INSTANCE" search is the one you expected.

However if the problem persist please send the AIP file (if not contain any confidential informations) or a test project that exhibits the same behavior to support at advancedinstaller dot com so we can take a look.

Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
Phobos
Posts: 85
Joined: Fri Sep 08, 2006 11:52 am
Location: Germany

Hi,

Thanks for the reply. Is there an easy way to change the schedule for the searches, or will I have to recreate them in the correct order?
Phobos
Posts: 85
Joined: Fri Sep 08, 2006 11:52 am
Location: Germany

Ok, it looks like this issue is caused by a wrong execution order of the searches. However, I was unable to fix this yet as AI does not allow me to change the order.
Even recreating the searches in question did not work, as AI does not keep that order. After creating my searches I use the "Test Search" button and all the searches appear in the correct order. But as soon as I save and build my package or reopen the project the order has changed and therefore the searches do not work the way I want them to.
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

Sorry, I was wrong. The RegLocator table does not contain an order column which means that the searches are not made in a specific order. This is windows installer behavior.

Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
Phobos
Posts: 85
Joined: Fri Sep 08, 2006 11:52 am
Location: Germany

Thanks gigi.

So you say that the searches are not made in a specific order, but still, for some of my searches this is working fine since weeks. That should mean that those searches do always get executed in the right order, or that this is just luck.
What do you suggest, is there anything I could try? Thanks!
Phobos
Posts: 85
Joined: Fri Sep 08, 2006 11:52 am
Location: Germany

I just made a few tests. When adding 4 of my searches in the correct order everything is working fine, and all of them return the correct values. But as soon as I add a new search the order gets messed up and therefore my previous searches cannot get the right values anymore. Why does AI not keep the searches in the order they were created?
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,
Why does AI not keep the searches in the order they were created?
Because Windows Installer does not ensure you that the searches are made in the order that you added them :(.

Best Regards,
Gigi
_______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
Phobos
Posts: 85
Joined: Fri Sep 08, 2006 11:52 am
Location: Germany

Hi Gigi,

It's sad that Windows Installer is not performing the searches in the order they were added. Maybe I find a workaround using custom actions.
Thanks for the help.

Return to “Common Problems”