XXL66
Posts: 17
Joined: Mon Apr 28, 2008 3:00 pm

conditional install

Hello,

i'm using advanced installer 10.0 and i'm building an installer for a AutoCAD / BricsCAD application. So this is not installing an typical executable but a plugin.
What I would like to achieve is to detect if a valid BricsCAD is installed on the system for a conditional install.
I can do this by checking the registry.

fe. below (copied from a innosetup script written by Owen Wengerd)

if IsWin64() then
if RegQueryStringValue(HKCU64, 'Software\Bricsys\Bricscad\V16x64', 'CURVER', ProductKey) then
if RegKeyExists(HKLM64, ('Software\Bricsys\Bricscad\V16x64\' + ProductKey)) then
begin FoundSupportedHost := True; Result := True; end;

I have looked into the search functions of AI but i cannot seem to achieve this.
The query should be possible, but can i do another search with the result of the query and add the productKey to the path ?

ty !
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: conditional install

Hello,
What I would like to achieve is to detect if a valid BricsCAD is installed on the system for a conditional install.
I can do this by checking the registry.
In order to perform a registry query, you can go in the Search page and define a registry search operation. Use the [ New Search Wizard ] toolbar button, to set up a new search, following step-by-step directions.

If the related registry entry is found, then the property attached to the search operation is set, otherwise the property is empty.
but can i do another search with the result of the query and add the productKey to the path ?
You can add a registry entry in the Registry page. For details, please take a look on the Add registry keys and values to your package article with related information for hints and guidance.

To conditionally install the registry, please take a look on the How to conditionally install a file or a registry? article.

Please let me know if that helped.

Best regard,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”