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

Minor upgrade problems!


19 replies to this topic

Christoph

Christoph
  • Full Members
  • 81 posts

Posted 08 September 2004 - 13:15

I'm working on a MSI Installscript project and I want to get the minor upgrade to work.
I've read through different forum threads but I didn't found out a solution how to handle the minor upgrade.

I have created an installer with productversion 1.23.50. My files are dynamically linked into components and every component has a keyfile defined.

Now, I want to recreate the installer by changing the packagecode and changing the productversion into 1.23.60. Only a couple of dll's are changed, most of the files stays unchanged.

For testing the upgrade, I install the version 1.23.50 of the product and then run the 1.23.60 installer. The installer behaves like running a minor upgrade so this seems ok.

However, when I look at the files, only a couple of files are changed, the rest is unchanged!?

Can someone tell me how I get this minor upgrade to work. I'm rather new to installshield X, so please take this into account. sad.gif

Thanks for any information

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 08 September 2004 - 13:35

Generate a verbose log of the update process. It may tell you what's going wrong. In particular look out for SELMGR messages.

Christoph

Christoph
  • Full Members
  • 81 posts

Posted 08 September 2004 - 15:41

Hello Stefan,

I've included the log that was generated when trying a minor update from version 1.23.50 to version 1.21.60.

I don't encounter the word that you mentioned and the update still did not update all my files.

I've found some other information on another forum thread:

To let a minor update work:

1. Change your package code(I did this)
2. Change your package version(I did this)
3. Set the MSI Commandline params "REINSTALLMODE=voums REINSTALL=ALL"
4. Create a custom action to set the property REINSTALL to a value of {}
5. Create a custom action to set the property REINSTALLMODE to a value of {}
6. Go to the sequences view. Under installation/User Interface insert both custom actions after CostInitiialize. Give both of them a condition of "Not Installed".
7. Under installation/Execute insert both custom actions after CostInitialize. Give both of them a condition of "Not Installed".

Do you think this will work???

Some questions about the steps mentioned above:
Step 3. Do the params need to be separated by a colofon or something else??
Step 4. Within the custom actions view, you can select the custom action "set property" by when you click on the Property Name setting, I do not see the REINSTALLMODE and REINSTALL property. Do I first need to set them myself within the property manager??

Christoph

Christoph
  • Full Members
  • 81 posts

Posted 09 September 2004 - 10:06

(I wasn't able to include my logfile since it was bigger than 100KB. However, the keyword you mentioned to look for, was not present...)

I've been looking further within this issue...

First some information: When I build my installerproject, I'm ending up with an setup.exe, a data1.cab and an msi file.

The setup.exe is launching the msi file as I understand correctly.

For being able to run an installer as a first time installation, a maintenance run and a minor upgrade, I need to tell the windows installer engine in which mode to run.

When I'm hardcoding the REINSTALLMODE and REINSTALL propertys to the commandline, I never get my installer to run within maintenance mode when launching the same installation package for the second time after installing already some files to the system.

I must be able to trigger my installer to actually follow this path:

If Not IsChanged(ProductCode) Then
If IsHigher(ProductVersion) Then
' MinorUpgrade
Run(msiexec /I pkg.msi REINSTALLMODE="vomus" REINSTALL="ALL")
Else If IsSame(ProductVersion) Then
' Maintenance
Run(???) ' Hmm, I forgot, how run maintenance
End If
End If

Can someone tell me how to achieve this or is there an easier sollution??

Thanks for any information.

MonkeyK

MonkeyK
  • Members
  • 33 posts

Posted 09 September 2004 - 15:12

I'm not sure about the approach you are taking. You say some, but not all files are getting updated, do you mean within a component?

Are your components using a key? If so the key determines if files in the component should be evaluated for update or not.

Are you familiar with the file versioning rules? If not read MSI file versioning rules It is one of the most important things to know about windows installer.

Christoph

Christoph
  • Full Members
  • 81 posts

Posted 09 September 2004 - 15:27

The component with the files that gives problems with the updating process, contains several dll's who are dynamically linked. No keyfile is defined within this component.

I did this, because we make an automatic build daily(with installer) and so people can add dll's without triggering me and they are linked into the installer automatically.

OK, I will read the link about the file versioning rules with attention. Maybe this solves the update problem but I don't see a solution to make an installer that can handle first time installation, maintenance installs and minor upgrade installs.

I should find a solution for changing the commandline for the MSI package dynamically before it is launched.

Anyone experience with this?

MonkeyK

MonkeyK
  • Members
  • 33 posts

Posted 09 September 2004 - 15:50

Are you saying that you want to perform minor updates in maintenence mode? If so, I'm not sure how to go about that.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 09 September 2004 - 20:50

Your log file is > 100 KB even if you ZIP it?

Christoph

Christoph
  • Full Members
  • 81 posts

Posted 10 September 2004 - 07:34

Stefan, my logfile is 196KB after zipping.

Probably the update problem has something to do that I link my files dynamically within the component and so hasn't defined a keyfile.

I will try to read the chapter about fileversioning again within MSDN.

But my other problem is that I still not have a solution for a the fact that I want one installer that goes can handle a first install(this is ok smile.gif ), goes into maintenance mode and can do a minor update.

I will probably need to set the commandline for the msi package at-run-time by following this principe:

If Not IsChanged(ProductCode) Then
If IsHigher(ProductVersion) Then
' MinorUpgrade
Run(msiexec /I pkg.msi REINSTALLMODE="vomus" REINSTALL="ALL")
Else If IsSame(ProductVersion) Then
' Maintenance
Run(???) ' Hmm, I forgot, how run maintenance
End If
End If

How and where need I set this test or is there another solution possible??


Christoph

Christoph
  • Full Members
  • 81 posts

Posted 10 September 2004 - 09:24

update of the situation(InstallScript MSI Project):
================================

I have two packages:
Package1 = ProductVersion 1.23.50 Packagecode X
Package2 = ProductVersion 1.23.60 Packagecode Y

For Package2, I've added within the releasepane at my releaseoptions REINSTALLMODE=vemus REINSTALL=ALL as MSI Commandline options.

I've also created two custom actions(Set Property) called 'cleanREINSTALL' and 'cleanREINSTALLMODE' that sets the properties REINSTALL and REINSTALLMODE to {}.

I've included them within the sequences pane after Costinitialize with both the condition Not Installed. QUESTION: Do I need to use "" around the word Not Installed??

When I build my package2, I get a warning at buildtime that says "Warning -6506 .... This will cause your setup to always run in Resume Mode".

Then I tried following situations:
a. Install package1, install package2 ==> MINOR Upgrade went correct (OK)
b. clean install Package2 ==> doens't install anything. The installer seems to run in RESUME mode

c. Since test b didn't succeed, i don't know if my package2 would go into MAINTENANCE mode.

So... Updating seems to work but I need a generic way to let package2 go into FIRST INSTALL MODE, MAINTENANCE MODE or UPGRADE MODE depending on the system situation.

Can someone tell me how to achieve this?!

Thanks!!

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 10 September 2004 - 10:12

Which InstallShield version are you using? The setup.exe in the more recent versions handles these command line parameters for you, so you wouldn't need to set them, and you wouldn't need the custom actions.

Do not use quotes around Not Installed. If you used quotes that's the reason for test b failing.

Christoph

Christoph
  • Full Members
  • 81 posts

Posted 10 September 2004 - 11:26

Stefan,

I'm using Installshield X... so setup should handle this automatically you think?!

The fact is, I need to set commandline parameters because I want to perform the MINOR Upgrade with these properties: REINSTALLMODE=vemus REINSTALL=ALL.
Since vemus is not the default parameter setup.exe is adding when going into MINOR UPGRADE mode, my MINOR UPGRADE does not perform correctly when I'm not adding these properties at the commandline.

I've still been playing around and I found this:

My package2(see reply above) can go only into FIRST INSTALL mode(this worked now since I removed the "" around Not Installed) and RESUME MODE(=Upgrade mode) when launching straight the setup.exe.
When launching the package2 via the Add/Remove Control panel, it launches the MAINTENANCE mode correctly. This is probably because clicking on the entry within the Add/Remove Control panel, launches IDriver.exe /M{productcode}?!? Am I correctly when saying this.

So... still one problem... how can I make package2 launch into MAINTENANCE mode(if package2 is already installed ofcourse) when launching straight the setup.exe??

It seems the package is not detecting maintenance mode correctly, probably due to adding these commandline parameters but removing them is actually no solution since, as I told you, the user will end up with a failed upgrade.

Thanks for any kind of information so far!!

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 10 September 2004 - 20:10

Why do you need to use vemus instead of vomus? Did you fail to increment the version number of your files?

You could try the setup.exe from http://www.vinga.se/...tup/default.htm . With this you can define which command line parameters will be used for a minor update.


Christoph

Christoph
  • Full Members
  • 81 posts

Posted 13 September 2004 - 07:32

Indeed, sometimes fileversions are not incremented correctly by the person(s) who deliver me the files. Therfore I want to always upgrade to the current distributed files with the current installer(but I want to stick up with a MINOR upgrade).

I will have a look at the link you requested.

Thx.

MonkeyK

MonkeyK
  • Members
  • 33 posts

Posted 13 September 2004 - 15:12

Christoph,
This may not apply in your situation, but you can also modify file versions yourself in InstallShield. In the component, right click on the file, select properties, and select "Override system version". this will treat the file as your specified version for the purpose of the install only (the installed file will still be the original version).

I use this to update files that are not versioned but need to be updated with each release (I set the version in IS to 9999).
In your case, you can update the version and send a reminder to the developer to do so for the next release.

Christoph

Christoph
  • Full Members
  • 81 posts

Posted 14 September 2004 - 11:10

Thanks for the tip. I will try this.

But however, I will stick up with the problem that my installer will keep running within RESUME mode when the installer has already installed some files on the system. This is probably due to the fact by defining the commandline 'REINSTALLMODE=vemus AND REINSTALL=ALL'.

I get only my installer within modify mode when clicking the Change/Remove button within the Add/Remove control panel.

As I understood, the installer should normally automatically determine when run into FIRST INSTALL MODE, MODIFY MODE or RESUME MODE. But I'm not seeing a solution for this since I also understood that you MUST define the commandline 'REINSTALLMODE=vemus AND REINSTALL=ALL' to run a correct upgrade?!

Is there a possibily to change the commandline before the installerengine reads it out? I think I must look into this direction for a solution.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 14 September 2004 - 19:37

Basically the question is: which dialogs should be displayed. And you can control this using the condition on the dialogs. So you could tweak your msi to show the maintenance dialog even if these command line parameters are set. (Actually I would not recommend to enter Modify mode while installing an update)

Christoph

Christoph
  • Full Members
  • 81 posts

Posted 15 September 2004 - 08:33

Stefan,

I don't want to show the maintenance dialog when running within update mode... I want that the installer is showing the maintenance dialog when exactly the same installerpackage is running the second time(the default behaviour).

At this moment, I'm not able to achieve this since it always runs within UPDATE mode when launching the installerpackage more than ones(probably due to the fact that it encounters the commandline parameters).

I only get into maintenance mode when launching the installer via the Add/Remove control panel.


sad.gif

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 16 September 2004 - 08:32

Still you could handle this by adjusting the dialog conditions. You could for instance compare the installed version to the version in the running setup. If they are equal, show the maintenance dialog.

Christoph

Christoph
  • Full Members
  • 81 posts

Posted 16 September 2004 - 12:25

Ok, I will try the solution you proposed... although this will get me to the next question:

Where should I implement the check on the versions?? If I code the check via installscript within the OnBegin function... is this quick enough to prevent the installer entering update mode or should I create a custom action within the sequence view?? If so... which action within the sequence view is determining wether the installer should enter update mode or maintenance mode??

Thanks for all your help so far... it helped me a lot!