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: Conditional Prerequisite
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
‎Aug 10, 2009
09:43 AM
Conditional Prerequisite
I have a Basic MSI project that I want to check whether a user exists on the current system before installing PostgreSQL. I created a Redistributable package for PostgreSQL that just uses a command line to execute the PostgreSQL MSI package. This package creates the user on the local system. The problem is that if this user exists the installation will fail. I wrote a managed DLL in C# that can check for the user on the local system and created a custom action that puts its result in a variable called POSTGREEXISTS.
What I am trying to do is to run this custom action to set the variable and then check the variable to see if I should run the PostgreSQL redistributable or not. Any help on this or a better way to do this would be so appreciated.
What I am trying to do is to run this custom action to set the variable and then check the variable to see if I should run the PostgreSQL redistributable or not. Any help on this or a better way to do this would be so appreciated.
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 10, 2009
11:36 AM
Sorry about the posting again....any ideas on how to resolve this problem?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 11, 2009
01:31 PM
The only way InstallShield supports this would be with a Feature Prerequisite. This will run the prerequisite after the initial UI is shown; by conditionally installing the feature, you choose whether the associated prerequisite will be installed. In your case, however, it sounds likely you may prefer to exit with a message when this user exists, rather than installing without Postgres, at least if Postgres is truly a prerequisite for your software.