Launch only if a registry key exists - Advanced Installer Community
jwest
Posts: 56
Joined: Tue Dec 27, 2005 12:14 am

Launch only if a registry key exists

I have an x64 installer that should only launch if it detects that the 64 bit version of Microsoft Office 2010 is installed on the machine. If it doesn't detect it the installer should stop and the user should receive an error message.

If the 64-bit version of MS Office is installed then the following registry key will exist:

HKLM\SOFTWARE\Microsoft\Office

How do I add a custom launch condition to perform this check? The condition builder in AI doesn't seem to support this.

I thought about adding a search to create a True/False property that I could use in the condition builder but the search only allows me to retrieve the value of an item within a key and not check to see if a key exists.

I wish it were straight forward to be able to provide my own installer helper (a .dll written in C or C++ and compiled for x86 and/or x64 or just a vbscript ) that could handle both launch condition processing AND custom actions
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Launch only if a registry key exists

Hello,
I thought about adding a search to create a True/False property that I could use in the condition builder but the search only allows me to retrieve the value of an item within a key and not check to see if a key exists.
You can create an Extended Search from the search page. Set the criteria to "Registry key exists". You can then use that search's property in the launch condition.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
jwest
Posts: 56
Joined: Tue Dec 27, 2005 12:14 am

Re: Launch only if a registry key exists

You guys are brilliant!
Jis
Posts: 51
Joined: Thu Dec 12, 2013 6:02 am

Re: Launch only if a registry key exists

"You can create an Extended Search from the search page. Set the criteria to "Registry key exists". You can then use that search's property in the launch condition."

I am also facing a similar issue mentioned here.
But what i want to do is, search for the registry key value ( to get a particular version), and then display a message if the the key is doesnt have specified value.
What should I do in this case.

Thanks in advance,
Jis.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Launch only if a registry key exists

Hi Jis,

If you want to check if a search has a specified value you can compare its related property to that value using the operators mentioned in the "Edit Condition Dialog" article (i.e. MY_SEARCH = "My Value").

Let me know if this helped, otherwise give me more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”