Hello,
Here is the problem:
I have two features (FeatureA and FeatureB), each with a set of components. The default install location of Feature A is C:\Program Files\MyCompany\MyAPP (APPDIR). The default install location of Feature B is C:\TestFolderA (TestFolderA_Dir). I have the dialog phase set up such that the “SetupTypeDlg” is displayed, so the user can choose a “Custom” install.
When choosing a custom install, FeatureA and FeatureB are displayed. The install path of FeatureA is set to APPDIR (correct), but FeatureB is also set to APPDIR (not correct), even though all components in FeatureB are added to C:\TestFolderA. If I change the path of FeatureA, then FeatureB’s path is changed to the same path (and vice-versa). So, it appears both feature installation directories are tied to APPDIR, but FeatureB should be TestFolderA_Dir.
So, I go back into AI and see that the feature directory is set to APPDIR (even though all of it's compoenents are in TestFolderA_Dir). If I click the “…” button and try to select C:\TestFolderA (TestFolderA_Dir), I see:
So, I open up the properties of C:\TesetFolderA and try to change the identifier to all caps, so I can select it for the feature Directory:
However, it doesn’t let me change the identifier. I try changing TestFolderA_Dir to all caps in the table editor, but that doesn’t seem propagate to the feature install directory. So, I open the AIP in notepad++ and change all instances of TestFolderA_Dir to TESTFOLDERA_DIR, and now I can select TESTFOLDERA_DIR for the feature installation directory. At this point, everything seems to work for clean installs. FeatureB now installs to TESTFOLDERA_DIR, and the files are installed to the correct directory.
However, I then run into the following issue. If I perform a clean install and use custom installation paths, during a major upgrade, the custom path for FeatureA (APPDIR) is persisted, but the custom path for FeatureB (TESTFOLDERA_DIR) is not. Not sure if it matters, but I’m displaying the SetupType/Custom Setup dialog during major upgrades, so the user can change the paths if they want to.
Hopefully it’s clear what I’m trying to accomplish here:
• Have multiple features that might have their own installation paths (outside of APPDIR).
• Allow the user to change those installation paths in the “Custom Setup” dialog.
• Persist those installation paths during major and minor upgrades (minor upgrades seem to be working fine at this point). But, still allow them to change the paths if they want to (not super important, but nice to have).
How is the best way to accomplish this?
After doing some research, along with the tests above, I’ve reached the conclusion that, by default, windows installer does not carry over installation paths of features during major upgrades. And, the only reason APPDIR is carried over is due to custom logic implemented by AI (the “Use original installation path when upgrading” option). Would that be an accurate statement?
If that’s the case, I suppose the only option is to write any custom installation paths (other than APPDIR) to the registry during install, then read them in during a major upgrade. Does that sound like the right approach?
Also, why can’t I change the folder identifier to all caps? Having to do it in notepad++ is kind of annoying.
Thanks for the help!