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.

Update with new feature


4 replies to this topic

Guest_jminstall

Guest_jminstall
  • Guests

Posted 10 October 2008 - 15:33

Hello everybody,

i have a problem, for which i need some help. We are using Installshield 12, the Installshield project is an InstallScript-MSI project.

The next upate of our program contains a new feature, with which the merge modules of Crystal Reports can be installed. This new feature shall now be installed within the update or at least it should be set to "selected" in the list of the installed features (which you see when you want to add or remove features).

Can i use an option in the setup design? Or at least set the feature to "selcetd" in an installsript function, which is run in update mode?

Can anybody help me because i didn´t find something about that in the installshield help.

Thanks in advance
Joerg

P.S.: Sorry for writing this posting in the wrong section. Can i move a posting to another section?

Edited by jminstall, 10 October 2008 - 18:23.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 12 October 2008 - 14:09

I'm moving it to the appropriate subforum.

Oliver.Schwarz

Oliver.Schwarz
  • Full Members
  • 2 posts

Posted 13 October 2008 - 09:51

There are several ways you could do it. Just choose the one which suits you best.

1.) Go to the Setup Types view and add your feature to the type Minimal. This type is a default created with a setup project. It includes all features necessary for your application to work.

2.) Specify your Crystal Reports feature in the property Required Features of a feature, which is always installed. You can do it in the Setup Design or Features view.

3.) Select the feature in your script using the function FeatureSelectItem().

We're using all of the above in our setup. I cannot say, if the solutions comply with certain setup rules, but they work.

Guest_jminstall

Guest_jminstall
  • Guests

Posted 13 October 2008 - 13:32

Hello Oliver,

thanks for your help, but i´m not really sure if this helps.

QUOTE

1.) Go to the Setup Types view and add your feature to the type Minimal. This type is a default created with a setup project. It includes all features necessary for your application to work.


We don´t use the default setup types, but three setup types which we created ourself: Standard (which is similar to Minimal), Full and Custom. In all three of them the new feature is selected, but after an update the feature is not installed.

QUOTE

2.) Specify your Crystal Reports feature in the property Required Features of a feature, which is always installed. You can do it in the Setup Design or Features view.


The new feature is required for using the reports in the application. But some of our customers have newer versions of Crystal installed (which we don´t support officially yet). For these we added the new feature, so Crystal can be installed optionally. Or in other words: this feature must not be always installed.

QUOTE
3.) Select the feature in your script using the function FeatureSelectItem().


Maybe this is the most promising way. I know this function and i also thought about using it. But i don´t know, in which event in the script i should use it. It must be an event, which is only run in updatemode or at least i must know at runtime in the event, in which mode i am (so that i will call the FeatureSelectItem-funtion only in updatemode). I.e. in OnBegin the system variable UPDAETMODE ist always 0. The function OnUpdateUIBefore is neither added in the script by default (and so can´t be chosen by the pulldown menues) nor can i add it manually (message "function has no prototype declaration" (i hope this is correct, because i´m using the german version)). Does anybody have any ideas about that?

Best Regards
Jörg


Guest_jminstall

Guest_jminstall
  • Guests

Posted 15 October 2008 - 09:34

Helle everybody,

it seems that i have solved the problem. In the script i added in OnBegin the following code:

MsiGetProperty(ISMSI_HANDLE,"IS_MINOR_UPGRADE",strMinorUpgrade,nvBufferSize);
if (strMinorUpgrade == "1" || MAINTENANCE == FALSE) then
nvResult = FeatureSelectItem (MEDIA, "Crystal", TRUE);
endif ;

The function FeatureSelectItem is called in Updatemode and during a new installation (which doesn´t matter, because the selection is overwritten later).

Greetings
Jörg