Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Components not installed on upgrade


3 replies to this topic

RayKode

RayKode
  • Full Members
  • 58 posts

Posted 23 May 2007 - 21:22

Afternoon everyone,
IS 12 Sp2 NewBe here.

Here's a little background.

Basic MSI.
I created a custom dialog that has two check boxes on it.
The first check box has a property named CB1.
The second check box has a property of CB2.

I have two components named C1 and C2.
The first component has a "Condition" of "CB1".
The second component has a "Condition" of "CB2".

Both components are associated with a feature named F1.

Each of the above components installs a shortcut.



When the application INSTALLS for the first time, I can check either checkbox (or both) and the appropriate shortcuts are created on the pc.

Here's my problem:

Let's say I install the application for the first time and I click on the "CB1" check box.

The CB1 shortcut is installed.

Then I turn around and re-install the same application.

I choose the "Modify" option.

The Feature (F1) appears to to already selected. (Because it is already installed.)

And this time I click on the "CB2" checkbox from my custom dialog. (Which appears following the "Features" dialog.)

The UPGRADE dosen't generate any errors but I DON'T get the "CB2 shortcut installed on my pc.

I can't figure out what the heck I'm doing wrong.

Can I ask for some suggestions on how I might fix this ?

I should be very greatful.

Ray in Wisconsin



RayKode

RayKode
  • Full Members
  • 58 posts

Posted 25 May 2007 - 12:46

Hello again everyone.
Thanks to thoes who took the time to read my posting.

InstallShield support was not able to help me with my issue either.

I chose instead to accomplish my goal with the following .....

1. Create a new Feature called "AllShortCuts"
2. Create a sub feature of "AllShortCuts" called "Shortcut One"
3. Create a sub feature of "AllShortCuts" called "Shortcut Two"
4. Create a sub feature of "AllShortCuts" called "Shortcut Four"

Then the user can add or remove the various shortcuts by simply invoking the Modify option via the Control Panel/Add-Remove program/Change selection.

Done.

It was easy to accomplish and required less work than creating and referencing properties associed with a custom dialog.

Thanks again everyone.

Take care.

Ray in Wisconsin

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 29 May 2007 - 18:12

Problem with your original approach was that component conditions are evaluated during CostFinalize which is before your dialogs. Having separate features for those shortcuts is a good solution. If you prefer checkboxes, make the features invisible and add a dialog with check boxes. On the "Next button of that dialog add control events AddLocal and Remove to select or deselect the shortcut's feature based on the checkbox selection.

RayKode

RayKode
  • Full Members
  • 58 posts

Posted 29 May 2007 - 18:36

As always kind sir, Thank you.