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

Modify features at run time


8 replies to this topic

Bertrand

Bertrand
  • Members
  • 13 posts

Posted 12 February 2001 - 20:27


Hi,

does anyone know a way to modify features at runtime ?

My problem is the following : I wish to propose to distinct modes to users.

The first one is a 'normal' user mode. They are allowed to choose features among a restrained set of them.

The second one is a 'super' user mode.  A super user is able to choose features among ALL the available features.

A solution is to modify at runtime the display property of each feature, accordingly to user profile, 'normal' or 'user'.

So I did. I used the msi API to update the feature table record. But when I tried to validate the updated record, the call fails.
So, I though that was write access problem. The problem occurs whatever is the order of the updating custom action in the sequence (UI or Actions).

Does that  mean we can't update features during runtime ?

By the way, has anyone an idea on how to solve the problem ?

Regards,
Bertrand.


Thomas Eskesen

Thomas Eskesen
  • Members
  • 86 posts

Posted 15 March 2001 - 08:26

Hi

I have the same problem,.... have you fonu any solution?

I can change the features - in the very beginning of the UI sequence (before the CostFinalize (number 550)) But this is also befor the welcome dialog etc. - and I would like to show/hide features base on some user input!

Regrads,
Thomas Eskesen


Dave I

Dave I
  • Members
  • 195 posts

Posted 26 March 2001 - 16:12

Come On folks, there are 3 needy people here with a similar problem, can anyone help us???

Now this seems to be the most basic of requirements for an install,  the user selects an option, the install activates a feature accordingly?

I have a Property TEST which is set to TRUE or FALSE by a radio button.  

Feature Information:

                 Start InstallLevel              Condition
Feature1:        200                     1    TEST="TRUE"
Feature2:        200                     1    TEST="FALSE"

Now why doesnt this work?  The condition evaluates but uses the properties default, the user input is completely ignored.

Moving the CostFinalize after the dialogs isnt an option.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 27 March 2001 - 07:12

Feature conditions are evaluated during CostFinalize. If you want to use Feature conditions to hide features, and base these conditions on user input, you must either place the dialog before the costing actions, or move costing after that dialog.

You cannot modify existing table entries (that are stored in the MSI file) at runtime. You could however build the whole feature table on the fly. Such tables can be modified at runtime.

You can always de-select features with the Remove control event (and select them with AddLocal etc.). But such de-selected features will still be displayed in the feature tree dialog (with a red x) so the user can select them.


Dave I

Dave I
  • Members
  • 195 posts

Posted 29 March 2001 - 12:04

Stefan,
         I have moved CostInitialize, FileCost, IsolateComponets, ResolveSourece and CostFinalize to after my dialog and as your rightly predicted my user input is now being processed.

New problem, I want to use the property INSTALLDIR with the DestinationFolder dialog but I get error 2343 (Specified path is empty) presumably because CostFinalize is after my dialog and is not being resolved.  Chicken and Egg situation.

Oh an why when I expand the dialog sequence in my Install sequence does the computer hang for 30 mins + I do have about 40 dialogs be even still???   Bizarre!

Thanks in Advance


Andy van Stokkum

Andy van Stokkum
  • Members
  • 3 posts

Posted 31 May 2001 - 16:20

Stephan,

I have a similar requirement to the previous messages here. I could call CostFinalize after the user chooses an option, and deselect features in the CustomSetup dialog by using conditions, but I want to allow the user to go back to the previous dialog.

Could you please explain how to use the "Remove control event " to deselect features.  If I use this can I then allow them to use the back button?

I am using ISWI 2.03.

Thankyou...Andy

(Edited by Andy van Stokkum at 5:19 pm on May 31, 2001)


Andy van Stokkum

Andy van Stokkum
  • Members
  • 3 posts

Posted 31 May 2001 - 17:41

Don't worry - I worked out what to do.  I either do a Remove feature of Addlocal feature event when the next button is clicked.  Thanks.

miker

miker
  • Members
  • 8 posts

Posted 21 June 2001 - 19:02

I would like to thank the people for posting a reply to this question.  It has been bother me for quite some time.