cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
aclayto87
Level 5

Getting MSI Conditions to Work!

Hi,
I am trying to build an MSI program that will check the users computer to see what version of an exe they have. The exe (which is a service) is being put on their computer as a component and then also started through the direct editor. The problem is i only want the file replaced if the version in teh installer is a more recent version than the one on the users machine. I tried using the System Search Wizard and setting the minimum version for the file and then saving the value as INSTALLED. But whenever i run the installer there is no difference. I tried setting the version number to a higher value than the one on my machine, when i ran the installer i expected it to send an error message, but it installs. I have tried various ways to get this Condition scheme to work. In my case this Service cannot be installed as a Prerequisite/Redistributable so getting this Condition to work is essential. Can somone please post steps of how to build a condition to check version and what should happen when the correct version isnt found? thanks!
Labels (1)
0 Kudos
(1) Reply
RobertDickau
Flexera Alumni

The normal Windows Installer behavior is to overwrite an existing versioned file if the one being delivered has a greater version than the existing one, so you shouldn't need to do any searching.

In any case, a system search doesn't do anything by itself, other than populate a property if the search finds what it's looking for. If you generate an MSI log file, do you see if the file is being found when it should be?

(As an aside, there's a predefined MSI property called "Installed", so to avoid confusion you might consider renaming your property to "SERVICE_IS_INSTALLED" or something else.)

To see whether the property, perhaps put SERVICE_IS_INSTALLED (or whatever you call it) as an Install Condition/LaunchCondition, or as a condition on an action or component or whatnot. For that matter, for quick testing you could also put "SERVICE_IS_INSTALLED=[SERVICE_IS_INSTALLED]" in a text control on InstallWelcome to see if it's being set.
0 Kudos