Minor upgrade problems!
Posted 08 September 2004 - 13:15
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.
Thanks for any information
Posted 08 September 2004 - 13:35
Stefan Krüger
InstallSite.org twitter facebook
Posted 08 September 2004 - 15:41
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??
Posted 09 September 2004 - 10:06
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.
Posted 09 September 2004 - 15:12
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.
Posted 09 September 2004 - 15:27
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?
Posted 09 September 2004 - 15:50
Posted 09 September 2004 - 20:50
Stefan Krüger
InstallSite.org twitter facebook
Posted 10 September 2004 - 07:34
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 ), 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??
Posted 10 September 2004 - 09:24
================================
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!!
Posted 10 September 2004 - 10:12
Do not use quotes around Not Installed. If you used quotes that's the reason for test b failing.
Stefan Krüger
InstallSite.org twitter facebook
Posted 10 September 2004 - 11:26
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!!
Posted 10 September 2004 - 20:10
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.
Stefan Krüger
InstallSite.org twitter facebook
Posted 13 September 2004 - 07:32
I will have a look at the link you requested.
Thx.
Posted 13 September 2004 - 15:12
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.
Posted 14 September 2004 - 11:10
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.
Posted 14 September 2004 - 19:37
Stefan Krüger
InstallSite.org twitter facebook
Posted 15 September 2004 - 08:33
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.
Posted 16 September 2004 - 08:32
Stefan Krüger
InstallSite.org twitter facebook
Posted 16 September 2004 - 12:25
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!