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

sorting features


8 replies to this topic

lavocat

lavocat
  • Full Members
  • 158 posts

Posted 21 February 2006 - 13:30

My setup has many features displayed in the standard tree of the CustomSetup dialog.

I can sort the list for the default language (changing the display number of the feature table) but not for the other languages. InstallShield generate a mst file for each language.

Is there a common way to do this?



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 21 February 2006 - 17:58

Are you saying that the order changes when you select a different language? Or are you saying the order is always the same but you would like to set the ordering language dependent?

lavocat

lavocat
  • Full Members
  • 158 posts

Posted 21 February 2006 - 19:58

the order is always the same but I would like to set the ordering language dependent

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 22 February 2006 - 10:26

I don't think that's possible with InstallShield's help using the FeatureTree dialog. It may be possible by tweaking the generated language transforms manually.

lavocat

lavocat
  • Full Members
  • 158 posts

Posted 22 February 2006 - 10:50

No way to use checkboxes for the selection,
No way to sort the tree... We have more than 120 features displayed in the tree and 6 languages ohmy.gif(

So I'll try to use automation with ISWiAutomation


Thank you Stefan



Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 22 February 2006 - 21:36

If you're prepared to learn the MSI database APIs (MsiDatabaseOpenView() etc.) this could be done at run-time - after the transform is applied. Make sure the custom action is scheduled before the costing process.

lavocat

lavocat
  • Full Members
  • 158 posts

Posted 08 March 2006 - 12:24

Following your advice, I've made a CA (InstallScript code) which sorts Features at run-time: I change only the "Display" fields of the Feature table.

Everything seems to be ok but wanna be sure this is reliable at 100 %
I use this way:

for each record returned by a select I do:

MsiViewModify(hView,MSIMODIFY_DELETE,hRecord)
...
MsiViewModify(hView,MSIMODIFY_INSERT_TEMPORARY,hRecord)



I'm not able to use MSIMODIFY_UPDATE instead of MSIMODIFY_DELETE and then MSIMODIFY_INSERT_TEMPORARY


Why?

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 08 March 2006 - 20:45

The method is correct, first delete than insert a temporary record. You can't just update the record because the database is opened read-only, and a function like UPDATE_TEMPORARY doesn't exist. (Please don't ask why DELETE does work, instead of a DELETE _TEMPORARY...)
For that matter: the changes are not saved in the cached copy of your MSI file, so you've got to re-execute the CA in maintenance mode.

lavocat

lavocat
  • Full Members
  • 158 posts

Posted 09 March 2006 - 10:40

Thank you Zweitze!


If someone needs the code, just ask for it: chrismertens32@hotmail.com