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

Silent Install in Major Upgrade


8 replies to this topic

Sailesh

Sailesh
  • Full Members
  • 7 posts

Posted 21 July 2008 - 08:21

Hi all,

Sorry I am new to this community. I don't know whether this is the right forum to post this topic.

I have a big and complex MSI which needs to be upgraded. I am confused about what kind of upgrade I should be doing (minor or major).

Major upgrade is looking like the right choice after going thru the documentation, but its uninstalling existnig version and showing the UI again during Upgrade process. I want to suppress the UI and somehow want to retain the user selection when he did during installation.

Is there a way I can get the properties which are populated during installation and supply them for upgrade so that user won't feel that he has to install it fresh?


Thanks in advance,
Sailesh.

KathyMorey

KathyMorey
  • Full Members
  • 111 posts

Posted 21 July 2008 - 13:52

If the information is stored on the system somewhere, then you can look the items up (using the AppSearch table through the System Search view) and populate properties with them. Then you can condition the dialogs not to show if the properties have values.
Kathy Morey
Synergy Software Engineer
ProfitStars, a Jack Henry Company
kmorey@profitstars.com

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 21 July 2008 - 16:23

Whether a UI is visible or not depends on the way that setup was started, so you may want to write a different Setup.exe that installs the MSI silently. You can detect whether Setup will be performing a major upgrade, but when you get that information you can no longer hide the install - it is already visible.

When a major upgrade takes place, Windows Installer applies the same feature selection used by the previous selection. Note that you should not rename (internal names of) features, since the selection depends on the internal names. If you introduce new features, their feature states depend on the default feature state and the state of their parents.

Apart from feature states no information from the old install is copied into the new install. This may be a problem if the install folders of one or more features are important - indeed they get lost, the new version will be installed at the default folders.

Sailesh

Sailesh
  • Full Members
  • 7 posts

Posted 22 July 2008 - 07:46

Thanks for the information.

But, when I am doing major upgrade with options REINSTALL=ALL and REINSTALLMODE=vomus, its simply starting from fresh. Its not reading the features that are already installed and upgrading them unlike a minor upgrade.

Do I need to put a custom action to read what features are installed? One more thing, is it recommended or good to use a silent install in Major upgrade?

Thanks in advance.


PS : I am a dummy to MSI development and don't mind if my qns do not make sense or silly tongue.gif

KathyMorey

KathyMorey
  • Full Members
  • 111 posts

Posted 22 July 2008 - 13:25

If you do a major upgrade, you change the ProductCode and ProductVersion of the installer, and then you don't use REINSTALL or REINSTALLMODE. Because the UpgradeCode hasn't changed, the new install will detect that it is supposed to replace the old install, and it will then use the feature states of the old install to determine what features are selected, as Zweitze stated. It will uninstall the old version then install the new version.

If you don't change the ProductCode, but do set REINSTALL and REINSTALLMODE, then you are doing a minor upgrade, and the installer will, again, use the existing features as a guide to determine what features to install. In this scenario, it doesn't uninstall the old, it simply copies the new files over the old in the same place the old ones were installed.

If you decide on a major upgrade and need other information to be the same as the old install, but don't want to ask the user to reinput it, then you must detect the information as I mentioned before, by retrieving it from the system using AppSearch (System Search view) and storing it in properties that you use, and conditioning the dialogs not to show if those properties have valid values. For example, we still have a customer-determined path for data files recorded in an ini file. We look for that path using AppSearch, and if it is found, we do not display the dialog asking the customer where he wants his data stored.
Kathy Morey
Synergy Software Engineer
ProfitStars, a Jack Henry Company
kmorey@profitstars.com

Sailesh

Sailesh
  • Full Members
  • 7 posts

Posted 25 July 2008 - 05:46

Thanks a lot.

That did help me. But now, I am facing a new issue, the installer is not removing the older version, but its installing the same application side by side with the older one.

I tried searching and found "RemoveExistingProducts", but no matter how I am using it, its still not removing. Can you people suggest what exactly do I need to do?

TIA.

Sailesh

Sailesh
  • Full Members
  • 7 posts

Posted 25 July 2008 - 11:34

Hmm.. Interesting.. When I checked the logs it is giving this error

APPCOMPAT :no matching productCode in Product Database.


I am not getting why its not removing the old after finding it successfully. Any ideas?

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 25 July 2008 - 11:40

That's not an error message, it's just an information that there are no know compatibility issues with your application in Microsoft's database.

Do you have a record in the Upgrade table, i.e. did you add a Major Upgrade item (or a "automatic upgrade" item) in InstallShield's upgrade view?

What's the result of FindRelatedProducts and RemoveExistingProducts in the log?

Sailesh

Sailesh
  • Full Members
  • 7 posts

Posted 30 July 2008 - 11:04

Thanks Stefan. I got sidetracked for little thinking that it was an error message and tried to sort that also tongue.gif

Now, its not creating multiple instances, my sequencing was not proper. Thanks for the help.