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 with new feature


2 replies to this topic

tomknight

tomknight
  • Members
  • 16 posts

Posted 19 February 2002 - 15:56

My company's product gets updated every 3 months or so, and I've taken the "Minor Upgrade" (REINSTALL=ALL, REINSTALLMODE=vomus) route for this. In the last version I had to add some new features, and followed the advice from this site: "Do not add components to existing features. If you want to add a component, you must put it in a new feature. This can be an invisible sub feature of an existing feature. To install this new feature set the ADDLOCAL property to the name of the new feature. Note that you cannot combine this with REINSTALL=ALL. Instead use REINSTALL=ExistingFeature1,ExistingFeature2 ADDLOCAL=NewFeature."

That was mostly fine, BUT....
We're going to release a new version which only warrants a Minor Upgrade. Some people are on the previous version, and some are on older version. People on the previous version will be fine with REINSTALL=ALL, those on older versions will need the ADDLOCAL bits.

Obviously I want all people to be able to use exactly the same setup.exe, so how should I handle this? I've been tempted to use CmdLine=REINSTALLMODE=vomus REINSTALL=(List of features that existed before the latest ones were added) . I'd then tell the InstallShield to reinstall the new features if added already, and add them if not (and if they're required - in this case the new features are all subfeatures and are required if their parents are).

Okay, the questions are:
* Given that I'm running a Minor Upgrade, how do I add (using addlocal,
I guess) features? Putting an AddLocal control event on the SetupResume dialog doesn't seem to work.
* Would I use addlocal to reinstall these new features (assuming they're already installed) - remember, they aren't in the REINSTALL list in the setup.ini?
* How can I detect features already installed on the PC early enough to do add the new features?

It's best assumed that I'm not much of a programmer, but I'll gladly hack things together in InstallScript. I should be able to adapt VBscriopt and JavaScript if I need to.

I've a feeling that my real answer will be to rewrite the InstallShield, but I really don't  (and don't have time) to do this.

Thanks,

Tom.


Irina

Irina
  • Members
  • 227 posts

Posted 19 February 2002 - 17:34

Hi
I apply the upgrading with the same way. I have created the Upgrade.exe file ( C++ code, but you can use anything else for this) and customers could execute this file to upgrade the product. I do:
1. Detect the version of the installed product. (I have the registry key Version for my product).
2. Create the command line depeding of the product version.
3. Run setup.exe with this command line.

For example, I had in version 1.1 F1, F2 features. I have added F1_2 to the 1.2 version and then added F1_3 and F2_3 to the 1.3 version. I have to use the following command lines to upgrade any product version to the 1.3 version.
for 1.1
REINSTALLMODE=vomus REINSTALL=F1,F2 ADDLOCAL=F1_2,F1_3,F2_3
for 1.2
REINSTALLMODE=vomus REINSTALL=F1,F2,F1_2 ADDLOCAL=F1_3,F2_3

In any case you should put form version to version the existing features to  REINSTALL and only new subfeatures to ADDLOCAL.
If your product is not install in the machine, you could execute the setup.exe file without any command line parameters.
Good luck!


tomknight

tomknight
  • Members
  • 16 posts

Posted 20 February 2002 - 10:45

Thanks for that info!

Sadly, I have a problem with this method (and not just because of the coding required!) . It's not the method itself, its really to do with our previous installaton  - the first one with new features. Becasue these new features were a very last minute addition (oh, can you add these sub-directories please, before the CDs go out in a couple of days), there was a little confusion, firstly on my part, and then on the part of the engineers.

What I ended up doing was having a setup.exe for new installations and an upgrade.bat for upgrades. The setup.exe was as normal, while the  upgrade.bat had the ADDLOCAL=xxx REINSTALL=xxxlist. Despite notes and emails to all installation people, not all of them decided to use the upgrade.bat on upgrades. When they fund the PC didn't work, they manually copied the files from the CD to the PC. And no, I only found that out later on, and there certainly isn't a record of which machines are so affected.

What this means is that machines of the version with the added features may or may not actually have those features properly installed.

I think I'll probably have to check to see if the new features installed in the registry and play with that info.

Cheers,

Tom.