1

I've been playing around with how I want to setup my upgrades for an application install I'm creating using Installshield, using basic MSI projects.

I don't support any additional features/components and most of the upgrades will just be files/folders being added/removed from the default component.

I seem to be having difficulty in removing files/folders when creating an upgrade. I create my upgrade by copy/pasting the original setup.ism (i.e Version 1 of my install), so that I have all the files/folders of the original install, and then I just add/remove any changes. Is this correct? or should the upgrade.ism only contain newly added/removed files folders?

I first tried a Minor upgrade. I figured out how to remove files (right click - delete, and then add an entry to the RemoveFiles editor), but I haven't figured out how to remove folders. I don't want to have to manually add each file to the RemoveFiles table as there is likely to be hundreds of them. How can I have an upgrade remove a folder and all its children?

I've also tried the Major upgrade, which is very easy as I don't have to worry about removing files/folders due to it uninstalling first. But then I don't get the dialog that informs the user that it is actually an upgrade.

Kara
  • 6,115
  • 16
  • 50
  • 57
pastillman
  • 1,104
  • 2
  • 16
  • 27

1 Answers1

1

You can use your Action property defined in the UpgradeTable to detect if a major upgrade is occurring a present different UI elements to your user.

Most people will never need minor upgrades and/or patches. For most applications the major upgrade is the simplest approach to maintain and the downside of shipping the entire package is minimal. It's only for really large installers shipped to thousands or millions of customers this becomes an issue.

To remove a file during a minor upgrade you need to 'puncture' the component. You author it as transitive (InstallShield condition reevaluate=true) and give it an expression that always returns false. Checkout:

Uninstall a component during minor upgrade

Your approach of removing the component and authoring a rule in the RemoveFile table is incorrect. This breaks the component rules and reference counting.

It's a good idea to learn how minor upgrades work and what you can and can't do but don't be surprised if you find yourself leaning on major upgrades more.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
  • I'm sure I will end up using the major upgrade, but I'd still like to know how I would author an minor upgrades that removes files/folders. You've mentioned how I would apply removing files, does the same apply to folders? and when does the removeFile table come into it? and then there was the other question of if I'm upgrading the project App.ism, with a new project Upgrade.ism, I'm still unsure what Upgrade.ism should actually begin with. – pastillman Nov 03 '13 at 10:49
  • You can add components to a minor upgrade. Components can have RemoveFile entries that remove folders. Therefore minor upgrades can remove folders. You really should accept an answer and then post a new question for difference scenarios. It's annoying to answer someones multipart question without receiving an upvote or acceptance just to be asked even more questions. – Christopher Painter Nov 03 '13 at 12:20
  • Also, the [UserGuide page 1467](http://kb.flexerasoftware.com/doc/DocumentRepository/Installation/InstallShield/InstallShield%202013%20Professional/01_Public/Product_Manual/IS2013_UserGuide.pdf) says that what I was doing (method 1) (which you said is incorrect) is one of the recommended ways to remove files, so now I'm confused. Although they do mention the method you suggested as another way. – pastillman Nov 03 '13 at 15:28
  • You mean this: http://kb.flexerasoftware.com/doc/Helpnet/installshield15helplib/ConfiguringMinorUpgsRemoveInstalledData.htm There are problems associated with method 1. I like InstallShield, I know a lot of their people and get a lot of good use out of their software but there are a number of things that they do incorrectly IMO. After writing thousands of installers over the last 17 years, my quality standards are way higher. – Christopher Painter Nov 03 '13 at 16:10
  • FWIW, Michael Urman (IS Dev) is active here and I welcome any counterpoints that he may have for why method 1 is acceptable. – Christopher Painter Nov 03 '13 at 16:24
  • Well, method 2 seems just as easy, so I will follow your advice and use that approach. From my understanding, it also allows me to update directories easily, by creating a component for each directory that I know will change in the base setupVersion1.msi. And then when they do need to be changed (i.e in setupVersion2.msi) mark them as Transisive with a false condition so that they get removed, and then create new components with the updated directories. – pastillman Nov 03 '13 at 18:20