This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Getting MSI Conditions to Work!
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
Jun 08, 2010
12:09 PM
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!
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!
(1) Reply
Jun 08, 2010
01:53 PM
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.
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.