cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Richard_Winks
Level 6

Can I turn off prerequisites requirements for a build?

I'm trying to automate a build for 2 flavors of installation, one with the setup.exe launcher and one with just the .msi.

I've configured a Release that turns on compression and turns on the Setup.exe for a single executable.

I've configured a Release that turns on compression and turns off the Setup.exe for the .msi only build.

The problem is that my project includes prerequisites. This works ok for the Setup.exe build but the msi only build produces an error, complaining that I need to configure the Setup.exe launcher. The error breaks the build.

Is there a way to configure the project so that I can deselect the PreRequisites.

I'm using IS2011 with visual studio team foundation 2008. From the command line I have simulated the build step with the command:

MSBuild.exe MyProduct.sln /p:Configuration=Release;InstallShieldProductVersion=4.4.72;ProductConfiguration=SingleMSIRelease

Where the Release configuration is SingleMSIRelease | Release.

During the execution it produces the following:
C:\Program Files (x86)\MSBuild\InstallShield\2011\InstallShield.targets(68,3): error : -7067: Your project contains InstallShield prerequisites. A Setup.exe setup launcher is required if you are building a release that includes InstallShield prerequisites. Change your release settings to build Setup.exe, or remove the prerequisites from your project.

Richard
Labels (1)
0 Kudos
(6) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

I believe you can exclude the prerequisites via Release Flags (right click the prerequisites and select Properties, and also select flags in the release view) and have this error go away. I remember this partly because originally it didn't prevent the error.
0 Kudos
Richard_Winks
Level 6

Thanks Michael. I tried that.

Here's what I did.
I created a Feature called Prerequisites and associated my prerequisite with that. I entered a flag, "UsePrerequisites", on the Feature's "Release Flag" property.

Next I modified the Release configuration for the Setup.exe installer setting the "Release Flags" property value to "UsePrerequisites".

I left the "Release Flags" property value empty on the Release configuration for the single MSI installer.

I still got the error when I tried to build the single MSI installation.

I also tried editing the ISSetupPrerequisites table in the Direct Editor and entered "UsePrerequisites" in the ISReleaseFlags column (this is equivalent to setting the Release Flags property in Prerequisite's Property dialog).

I'm still getting the same error.

Richard
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

I'm a little unclear what you've got in your project; note that if either entry for release flag is empty, the item will be included. To exclude an item you need to have flags on both side and no overlap.

So for example you could specify:
Prerequiste's Release Flag: IncludePrereqs
FullEXERelease's Release Flag: IncludePrereqs
SingleMSIRelease's Release Flag: ExcludePrereqs
0 Kudos
Richard_Winks
Level 6

Well Michael, using some bogus flag value ("ExcludePrerequisites") for the Single MSI Release did the trick. Adding that and then building avoided the error.

I'm not sure how I missed that detail.

I assumed (bad habit) that if the prerequisite was defined with a Release Flag then you HAD to have the Release Flag defined in your Release configuration in order to activate the Prerequisite (Feature, chained msi, etc.). It never occured to me that you had to define some alternate flag to deactivate it. In other words I had assumed that not defining the IncludePrerequisites Release Flag in the release configuration, i.e. leaving Release Flags empty, was the same as saying "Do not include the prerequisites because IncludePrerequisites is not defined".

Thanks for the help.
Richard
0 Kudos
Richard_Winks
Level 6

One final thought before I let this go.

It occurs to me that if I had set the prerequisite Release Flags value to "IncludePrerequisites" and then set the Release Flags to "ExcludePrerequisites" for the MSI only release configuration where I did not want the prerequisites but left the Release Flags empty for the Setup.exe configuration it would have accomplished what I wanted as well.

IMO, This seems counterintuitive to me. This is not a complaint. It works how it works.

Richard
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

I agree that it's counterintuitive. However it makes things nicely symmetric. It doesn't matter whether it's the release or the item which has no flag; either one will result in the item being included in that release. So in this case, backwards compatibility will win.

Regardless, I'm glad you got it working, and know how to use this in the future.
0 Kudos