The question is what is your suggestion for the best approach to accomplish this, how to preserve old files from the previous installer.
Code: Select all
If you set the "Do not overwrite" option, it will work. This way the old file will be backed-up before the old product being removed during the "Preparing" action group (more exactly during the "RemoveExistingProducts" action) and will be restored at the end.In the newer version, if i set do not overwrite i think it will not take effect because we have already doing uninstall the old version and the config file is deleted first and then the new installation is done with checking to overwrite and will not preserve old config file, old config file will be missing
The idea is to preserve old configfile from the previous installation and when the upgrade is done if file is present just to skip all screens that asking for configurations, just installer simply change the rest of the files.
Also from the "Dialogs" page I deleted the "ConfigureDlg" dialog and now the user can not change the Features when installing v2.I have installed Only a feature one on this machine and then I try to upgrade I don't want other features to be installed I want only existing feature to be upgraded.
If you do not want to automatically migrate the feature and to conditionally install it in version 2, then you have to disable the “Enable Migrate Features action” option. But this is in contradiction with your previous request, first you wanted to automatically migrate the feature but now you do not want that, I’m a little bit confused.I see that files from feature b are installed I have attached some modifications to your example so you can check.
So not sure how to prepare the condition if i detect that with that version feature B is not compatible to be in disabled state and files not to be added or copied.
The uninstall process won't be affected by the Feature install condition. The setup package will uninstall as expected all the installed files.Also what will happen with uninstalling will be uninstalled process be affected with this kind installation?
Let say on your computer you have powershell.exe 1.0But this is in contradiction with your previous request, first, you wanted to automatically migrate the feature but now you do not want that, I’m a little bit confused.
You can save the feature state in a persistent property when the first version is installed and check that property during the upgrade.but I need to know that both features are selected not sure how to acquire this state with MsiQueryFeatureState on upgrade.