Hi,
I have a MSI installer created with InstallShield that installs some files. Each file is in it's own componennt so that any file that my installer installs it's a key file. So far so good everything is OK.
How I have a new version of the installer in which one of these files is no more needed. What is the best practice to get this file "removed" when I do a minor or major upgrade?
- my MSI installer has a component A which installs only one file myfile.txt (it'a a key file)
- in the next version of the product myfile.txt should not be installed.
I want to:
- when I install the new version of the product myfile.txt should not be installed
- when I upgrade the product (minor or major upgrade) the existing myfile.txt from previous version should be deleted
One idea is to remove the complete component A from new version, another idea is to leave the component there but to remove the file from it (sort of empty component).
What is the best practice for this?
Thanks for your help.
Dorel Sturm
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.
File no more needed in netxt version
Started by
dorelsturm
, Mar 30 2007 15:48
4 replies to this topic
Posted 30 March 2007 - 23:18
During an upgrade, if done properly, the component will be marked for removal if it does not exist in the newer version. However, just removing the file from the component does not guarantee it's removal. Reference Counting is performed at the component level, not the resource level. You might add an entry to the RemoveFile table if you want to be doubly sure it goes away.
Posted 31 March 2007 - 12:32
Yes, in short remove the component - that should be sufficient. Adding a RemoveFile table entry will also work but should not be required. Don't rely on a RemoveFile table entry only as the component will then be reinstalled via SelfRepair.
Regards
-Stein Åsmul
-Stein Åsmul
Posted 19 April 2007 - 14:30
Hi,
I just removed component A from the new version but very interesting things are happening, upgrade does not work: the new version is installed "correctly" (I see the new versions in Control Panel and in fact the MSI product behaves as the new version) but NONE of my file was updated on hard disk. I don't get any error (log file tells me everytning was OK) but I still have the old files after an upgrade.
Each my file is in it's own component as key file.
E.g. I have component A with file myFile.txt and component B with file myExe.exe.
Component A is no more needed in new version so I removed component A. But when I do an upgrade the file myExe.exe from component B is not upgraded (the version of the new file is bigger I checked this).
If I put back the component A in the installer the upgrade works OK.
Standalone installing of the new version work OK.
Any ideas?
I just removed component A from the new version but very interesting things are happening, upgrade does not work: the new version is installed "correctly" (I see the new versions in Control Panel and in fact the MSI product behaves as the new version) but NONE of my file was updated on hard disk. I don't get any error (log file tells me everytning was OK) but I still have the old files after an upgrade.
Each my file is in it's own component as key file.
E.g. I have component A with file myFile.txt and component B with file myExe.exe.
Component A is no more needed in new version so I removed component A. But when I do an upgrade the file myExe.exe from component B is not upgraded (the version of the new file is bigger I checked this).
If I put back the component A in the installer the upgrade works OK.
Standalone installing of the new version work OK.
Any ideas?
Posted 19 April 2007 - 18:21
Are you doing a Major or a Minor update? In the latter case don't remove a component from the msi. Instead you can set its condition to 0. This should also remove it from the target machine. But only if the transitive bit is set for the component.
Stefan Krüger
InstallSite.org twitter facebook