NOT operator check

Aug 9, 2010 at 4:54 PM

Hi,

I'm trying to fail the whole install of my product if some other software is already installed.  If they have this other product installed, I'd like DNI to stop the install, and tell the user why.

My DNI installs dot net, mySql, and my software.

What is the best way to do this?

Here's what I currently have for my component's install, and the registry installed check does not seem to work.  I'm looking for the apache registry keys and just trying to see if any version of apache is installed.  If so, I'd like to terminate theinstall and display a message to the user telling them that they must do something else if apache is already there.

<component package="#CABPATH\mt_hp.msi" cmdparameters="/l*v &quot;#APPPATH\MT_Install.log&quot;" cmdparameters_silent="/qn" cmdparameters_basic="/qb-" uninstall_package="" uninstall_cmdparameters="/qb-" uninstall_cmdparameters_silent="/qn" uninstall_cmdparameters_basic="/qb-" id="MassTransit HP" display_name="MassTransit HP" uninstall_display_name="" os_filter="" os_filter_min="winXPsp2" os_filter_max="" os_filter_lcid="" type="msi" installcompletemessage="" uninstallcompletemessage="Mass Transit HP was successfully uninstalled." mustreboot="False" reboot_required="" must_reboot_required="False" failed_exec_command_continue="" allow_continue_on_error="False" required_install="True" required_uninstall="False" selected_install="True" selected_uninstall="True" note="" processor_architecture_filter="" status_installed="" status_notinstalled="" supports_install="True" supports_uninstall="True" show_progress_dialog="False" show_cab_dialog="False">


      <installedcheckoperator type="Not" description="Installed Check Operator">


        <installedcheck path="SOFTWARE\Apache Software Foundation" fieldname="Apache" fieldvalue="" defaultvalue="True" fieldtype="REG_SZ" comparison="match" rootkey="HKEY_LOCAL_MACHINE" wowoption="NONE" type="check_registry_value" description="Installed Check" />


      </installedcheckoperator>


      <embedfile sourcefilepath="#APPPATH\mt_hp.msi" targetfilepath="" />


</component>

 

Thanks in advance...

Coordinator
Aug 12, 2010 at 6:37 PM

So you want to fail the installation if a certain condition is met. That's a nice feature that doesn't exist.

Your install check will find out whether Apache key exists - I think that you want to change the comparison operator from match to exists. Next, you're NOT-ing the operator. So now mt_hp.msi will install only if there's no Apache key. That as far as you'll get IMHO. Do check the log and find out what the registry key / value match is returning, that should be helpful.