MGS
Posts: 83
Joined: Tue Oct 04, 2022 9:52 am

Refresh registry search

Tue Nov 29, 2022 11:44 am

Hi there,

The registry search values are only set once at startup of the installer, is that correct?
Is it possible to refresh the value of a registry search while navigating through the installer using a custom action or some event?

E.g. those searches:
registry_search.png
registry_search.png (10.09KiB)Viewed 4677 times
All the best,
Johannes

Catalin
Posts: 6541
Joined: Wed Jun 13, 2018 7:49 am

Re: Refresh registry search

Tue Nov 29, 2022 1:53 pm

Hello Joannes,
The registry search values are only set once at startup of the installer, is that correct?
Yes, during the "Searches" action group.
Is it possible to refresh the value of a registry search while navigating through the installer using a custom action or some event?
Yes, that is possible,

The result of your search is saved in the property that has the same name as the search, e.g.: REGISTRY_KEY_ODBC_DRIVER_17_EXISTS

With that being said, you can use, at a later time in the installation, a "Set property" event that should set the property to a new value.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

MGS
Posts: 83
Joined: Tue Oct 04, 2022 9:52 am

Re: Refresh registry search

Tue Nov 29, 2022 2:54 pm

Hello Catalin,

Thanks for the fast reply!

That information was helpful. But my question
Is it possible to refresh the value of a registry search while navigating through the installer using a custom action or some event?
was misunderstood.

At any place in the installer I need the most recent value of the registry key. So I need a way to refresh the property that was assigned using the registry search (e.g. REGISTRY_KEY_ODBC_DRIVER_17_EXISTS). Luckily, I just was able to solve this myself by using a custom Powershell script where I read the registry key again and then assign the read value to the property using the AI_SetMsiProperty functionality.

Best regards,
Johannes

Catalin
Posts: 6541
Joined: Wed Jun 13, 2018 7:49 am

Re: Refresh registry search

Tue Nov 29, 2022 2:59 pm

You are always welcome!

Glad you managed to find a solution.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”