Problem with some files during upgrade
Hello all.
I have a problem with some files during upgrade.
I'm creating a regular .msi package. In this package I have beside .exe files also some config files. Each file is in own component and each component has just one file signed as a key file. Components are signed in different features.
During major upgrade (first uninstall old product and than install new one) every .exe file needs to be upgraded and config files not.
Can someone help me to set properties of each component of config files to achieved that - that during upgrade config files remains intact?
I tried with "permanent" and "never overwrite" option but after uninstallation all those files with these options set to yes, remain on the system which is not good.
Thanks in advance
Andreo
I have a problem with some files during upgrade.
I'm creating a regular .msi package. In this package I have beside .exe files also some config files. Each file is in own component and each component has just one file signed as a key file. Components are signed in different features.
During major upgrade (first uninstall old product and than install new one) every .exe file needs to be upgraded and config files not.
Can someone help me to set properties of each component of config files to achieved that - that during upgrade config files remains intact?
I tried with "permanent" and "never overwrite" option but after uninstallation all those files with these options set to yes, remain on the system which is not good.
Thanks in advance
Andreo
0 Comments
[ + ] Show comments
Answers (4)
Please log in to answer
Posted by:
KrisBcn
17 years ago
Hello Andreo,
You can add to your upgrade package to uninstall files even if they are not installed by this msi,
if you know the filenames and the directory where they are add them in the removefile table,
choose well the InstallMode (a column in that table) now I'm not sure if it's 1 or 2, look for it in the sdk or in msdn.
Hope it helps
KrisBcn
You can add to your upgrade package to uninstall files even if they are not installed by this msi,
if you know the filenames and the directory where they are add them in the removefile table,
choose well the InstallMode (a column in that table) now I'm not sure if it's 1 or 2, look for it in the sdk or in msdn.
Hope it helps
KrisBcn
Posted by:
jamsek19
17 years ago
KrisBcn thanks for replay.
I think we do not understand: I install config files with .msi package. Users can change them freely to tune the application. If Upgrade first uninstall those files and than install it back user's changes are gone.
Shortly, I'm looking for somekind of "upgradable" flag or flags which set a component so, that during upgrade these files are not removed and than reinstalled. These files must be removed just in case of uninstall of whole package.
Best regards
Andreo
I think we do not understand: I install config files with .msi package. Users can change them freely to tune the application. If Upgrade first uninstall those files and than install it back user's changes are gone.
Shortly, I'm looking for somekind of "upgradable" flag or flags which set a component so, that during upgrade these files are not removed and than reinstalled. These files must be removed just in case of uninstall of whole package.
Best regards
Andreo
Posted by:
KrisBcn
17 years ago
I think you can apply what I said before :
- In the base msi you set config files to permanent so they are not removed on uninstallation
- In the upgrade msi, you insert those config files in the RemoveFile table to remove them on uninstall, no matter if were installed or not with this upgrade msi.
If you choose the upgrade mode to remove old first then install new, the package won't ever be the same, so you've got to manage the upgrade msi to remove those files, or to backup them before uninstall old version and recover after install the new one.
I'm sorry but I don't know any upgrading flag.
Good luck :)
KrisBcn
- In the base msi you set config files to permanent so they are not removed on uninstallation
- In the upgrade msi, you insert those config files in the RemoveFile table to remove them on uninstall, no matter if were installed or not with this upgrade msi.
If you choose the upgrade mode to remove old first then install new, the package won't ever be the same, so you've got to manage the upgrade msi to remove those files, or to backup them before uninstall old version and recover after install the new one.
I'm sorry but I don't know any upgrading flag.
Good luck :)
KrisBcn
Posted by:
jamsek19
17 years ago
Hi KrisBcn.
Now we understand each other ;-).
Yes I know that there's no "Upgrade flag". I'm searching for something like "Upgrade flag" ;-)
I was playing with "Never overwrite" option too and after upgrade it was happened that I do not have config files on the system. Config files components are not set as permanent! Funny, but I understand why: at starting of upgrade MSI checks and remember that files must not to be overwritten. During uninstall phase of Upgrade those files are removed (marked as not permanent) and during Install phase nothing happened because files are marked as never overwrite. Files are gone :-(
Finally at the moment I found the solution. It is not just to set a flag or two but it is efficient: I put all those config files into "supported files" and I make a CustomAction to copy those files to proper location just in case of Install. If Upgrade is performed, nothing happened. Also I implemented reversed CustomAction to remove those files during real Uninstall or rollback.
Best regards
Andreo
Now we understand each other ;-).
Yes I know that there's no "Upgrade flag". I'm searching for something like "Upgrade flag" ;-)
I was playing with "Never overwrite" option too and after upgrade it was happened that I do not have config files on the system. Config files components are not set as permanent! Funny, but I understand why: at starting of upgrade MSI checks and remember that files must not to be overwritten. During uninstall phase of Upgrade those files are removed (marked as not permanent) and during Install phase nothing happened because files are marked as never overwrite. Files are gone :-(
Finally at the moment I found the solution. It is not just to set a flag or two but it is efficient: I put all those config files into "supported files" and I make a CustomAction to copy those files to proper location just in case of Install. If Upgrade is performed, nothing happened. Also I implemented reversed CustomAction to remove those files during real Uninstall or rollback.
Best regards
Andreo
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.