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: Evaluating a condition that doesn't exist
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 30, 2012
12:50 PM
Evaluating a condition that doesn't exist
I've been using installShield for many years and I'm quite used to adding conditions to my various features. For example I often test the value of the VersionNT property so that a feature can get installed on (say) XP but not on Windows 7.
Our app is entirely 32 bit but like most 32 bit apps it runs perfectly well on Win64. However, there's one specific component which doesn't need to be installed on a 64 bit system.
My understanding is that install conditions only get evaluated if they exist on the destination system. So if you test for a condition that doesn't exist, your component will get installed anyway.
According to something I read on Microsoft's MSDN site an MSI installer can find out if a condition exists before evaluating it. To test whether or not it exists you supposedly compare its value to an empty string (""). So in this particular feature I've added the following condition:-
VersionNT64=""
This should evaluate to TRUE if the user's OS is NOT 64 bit. I expected that the feature would now only get installed on Windows32 and NOT get installed on Windows64 (where VersionNT64 will usually be defined). But in fact my feature and its components get installed in both cases. Is there a way to achieve what I'm trying to do?
Our app is entirely 32 bit but like most 32 bit apps it runs perfectly well on Win64. However, there's one specific component which doesn't need to be installed on a 64 bit system.
My understanding is that install conditions only get evaluated if they exist on the destination system. So if you test for a condition that doesn't exist, your component will get installed anyway.
According to something I read on Microsoft's MSDN site an MSI installer can find out if a condition exists before evaluating it. To test whether or not it exists you supposedly compare its value to an empty string (""). So in this particular feature I've added the following condition:-
VersionNT64=""
This should evaluate to TRUE if the user's OS is NOT 64 bit. I expected that the feature would now only get installed on Windows32 and NOT get installed on Windows64 (where VersionNT64 will usually be defined). But in fact my feature and its components get installed in both cases. Is there a way to achieve what I'm trying to do?
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 31, 2012
08:06 AM
I think you'll want to use one of the following as your component's condition:
VersionNT64 (to install the component on 64-bit systems)
Not VersionNT64 (to install the component on 32-bit systems)
To test whether a property exists, you need to simply use the property name as the condition. Include the Not operator if you want the condition to evaluate as true if the property is not set.
VersionNT64 (to install the component on 64-bit systems)
Not VersionNT64 (to install the component on 32-bit systems)
To test whether a property exists, you need to simply use the property name as the condition. Include the Not operator if you want the condition to evaluate as true if the property is not set.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 02, 2012
05:49 AM
Thanks for the suggestion Debbie. It worked (if a little strangely).
Whenever I've needed to do this kind of thing in the past, I've tended to apply the condition to a feature, rather than to individual components. For example, if I wanted to install some components only on Windows Vista or above I'd create a new feature called (say) InstallVistaOrHigher and I'd set it to check for the condition VersionNT>599. I'd then just place any relevant components into that feature.
But VersionNT64 doesn't seem to work that way. I need to set it on the individual components rather than the feature. Does that make any sense to you? It did work but it's a departure from what I'm used to, so I found it a bit confusing.
Whenever I've needed to do this kind of thing in the past, I've tended to apply the condition to a feature, rather than to individual components. For example, if I wanted to install some components only on Windows Vista or above I'd create a new feature called (say) InstallVistaOrHigher and I'd set it to check for the condition VersionNT>599. I'd then just place any relevant components into that feature.
But VersionNT64 doesn't seem to work that way. I need to set it on the individual components rather than the feature. Does that make any sense to you? It did work but it's a departure from what I'm used to, so I found it a bit confusing.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 02, 2012
10:57 AM
Hmm. That's odd. In any case, I'm glad you got it working.
![](/skins/images/CC38E504FC9E1309DC48ACFEB4925670/responsive_peak/images/icon_anonymous_message.png)