0

I created an installer "test.msi" . It is version-1. test.msi contains 2 components "comp1", "comp2" comp1 contains 2 files "comp1_file1", "comp1_file2"

In version 2 of test.msi , --> a new component added "comp3". It contains 1 file "comp3_file1" --> "comp1" component is updated. "comp1_file2" file removed and new file "comp1_file3" added Now it contains 2 files (comp1_file1, comp1_file3)

if i upgrade test.msi from version-1 to version-2 using "msiexec /i test.msi REINSTALL=ALL REINSTALLMODE=vamus", in installation folder still i can see version-1 file "comp1_file2".

if i downgrade from version-2 to version-1 using "msiexec /i test.msi REINSTALL=ALL REINSTALLMODE=vamus", in installation folder version-2 related files exist (comp3_file1, comp1_file3).

How to remove old entries(components/files) at reinstall time?

i am using installshield 2008 premier edition.

Rajeshaz09
  • 348
  • 5
  • 14
  • You need to supply way more info... what application are you using to build your installer? What are the various settings you have on your components? – slugster Jan 17 '11 at 08:06
  • i am using installshield-2008 premier edition. – Rajeshaz09 Jan 17 '11 at 08:15
  • I don't think you can remove components during a repair. Components are removed during uninstall or modify. During a repair Windows Installer simply reinstalls components. – Cosmin Jan 17 '11 at 08:25

2 Answers2

1

Transitive components are the way to go. MS describes them here: http://msdn.microsoft.com/en-us/library/aa372462%28v=vs.85%29.aspx

To follow up on what Chris said, playing with the reinstallmode can do some nasty things. This is particularly true if you're including any shared components. You can backlevel components that other applications are depending on, and you can find yourself prompted to stop seemingly unrelated applications based on files in the shared components being in use. It's a really good thing to avoid if you possibly can.

Ed.
  • 1,172
  • 6
  • 9
0

As Cosmin suggested you cannot remove components during repair, but you can uninstall the previous versions before starting the install process for the new version.

One way to go with InstallShiled 2008 is to create a major upgrade that will do this. Video Tutorial.

Edit

As Christopher said: There are ways to remove components in minor upgrades / repairs. Comment below.

Adrian Fâciu
  • 12,414
  • 3
  • 53
  • 68
  • 1
    There are ways to remove components in minor upgrades / repairs. You use transitive components with conditional expressions that will evaluate to false under the right circumstances. You really have to know what you are doing though. BTW- AMUS is very dangerous if you don't understand the ramifications of the "A" vs "O". – Christopher Painter Jan 17 '11 at 13:05