Custom launch condition using extended search for registry key. - Advanced Installer Community
eeh830
Posts: 2
Joined: Thu Jan 10, 2019 12:43 am

Custom launch condition using extended search for registry key.

Hi Advanced Installer team,

- Using latest version 15.6
- Project is Single EXE Setup with one Pre-install and two Feature-based prerequisites.
- I have single Extended Search named "CODE_INSTALLED" with Criteria set to "Registry Key Exists". This key does exist in the registry.
- I have Custom Launch Condition (CODE_INSTALLED = "1") that always fails (install ends prematurely) unless I un-check "Check launch conditions before
searching for prerequisites" on Prerequisites page. If unchecked, it works as expected. Is this intended?
- I have seen similar recent reports, i.e. "[BUG] launch condition before prerequisites" but those have ties to silent mode and have been fixed.

Any help is appreciated,
Erik
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Custom launch condition using extended search for registry key.

Hello Erik and welcome to our forums,
If unchecked, it works as expected. Is this intended?
No, that is not intended. This, indeed, seems to be a limitation in what regards our support for extended searches (like the one that you are using).

I have talked to the development team and hopefully this will be fixed in a future version of Advanced Installer. Unfortunately, for the moment, I can not give you any estimation on when this will be fixed. I will update this thread as soon as this will be fixed.

Until then, however, you can use one of the following workarounds:

1 - As you have already stated, if you uncheck the "Check launch conditions before searching for prerequisites" option, the bug does no longer reproduce.

2 - As I have earlier stated, this is a limitation to our predefined support for extended searches. However, if possible, you can use a normal search and you will no longer encounter this behavior. However, a normal search only operates with registry values, not with registry keys. Here is a small example on how you can utilize a normal search:

In this example, I will use the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework
and the following registry value: InstallRoot

- Please go to "Search" page and create a new search: right click -> "New Search" -> right click on the newly created search -> "Add search location" -> "Registry"

- In our example, the search can look something as it follows:

Root: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Microsoft\.NETFramework
Name: InstallRoot
Type: Retrieve the raw value


Upon pressing the "Test Search" button from the toolbar (on my machine), this search will return the following value: C:\Windows\Microsoft.NET\Framework\

- Now you can go to "Launch Conditions" page -> "Custom" tab and add a new launch condition as it follows (from our example):

RESULT_PROPERTY = "C:\Windows\Microsoft.NET\Framework\"

"RESULT_PROPERTY" is just the default name for my search. You can configure that as you wish.

Hope this helps.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
eeh830
Posts: 2
Joined: Thu Jan 10, 2019 12:43 am

Re: Custom launch condition using extended search for registry key.

Hi Catalin,
Thanks for the prompt reply. I will go ahead and use one of your suggested solutions until the fix is available.

I appreciate your looking into this, thanks again,
Erik
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Custom launch condition using extended search for registry key.

You are always welcome, Erik.

I am glad I could help.

I will update this thread as soon as the fix will be available.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”