I am using AI 7.6 build 27499
I have some questions about the "per-machine if user is administrator, per-user otherwise" option and how that relates to the install path. I have read the Install Parameters documentation and read many related posts on the forum.
========== Question #1 ==========
--- Project Configuration ---
* On the Install Parameters page, I selected "per-machine if user is administrator, per-user otherwise". This option automatically sets the Application Folder to "[ProgramFilesFolder][Manufacturer]\[ProductName]"
* On the Dialogs page, I added the "InstallTypeDlg" to the "First Time Install" sequence. It is listed after "WelcomeDlg" and before "FolderDlg".
--- Environment ---
* WinXP
* standard user (non-admin)
--- Steps ---
1. Run generated msi as the non-admin user.
2. On the InstallTypeDlg, the "Only for me" option is selected by default. Click "Next".
3. On the FolderDlg, the install path is populated with "C:\Program Files\[Manufacturer]\[ProductName]"
--- Expected Behavior ---
* Since the user is a non-admin and used the "Only for me" option (well, kept the default), the install path should be populated with a user-specific folder.
--- Continued Steps ---
4. From the FolderDlg, click the "Back" button.
5. Back on the InstallTypeDlg, choose the "Everybody" radio button and then click the "Next" button.
6. On the FolderDlg, the install path will still be "C:\Program Files\[Manufacturer]\[ProductName]", which is expected.
7. Go back to the InstallTypeDlg again, choose "Only for me", click Next.
8. On the FolderDlg, the install path should *now* be populated with "C:\Program Files\<user>\Local Settings\Application Data\Programs\[Manufacturer]\[ProductName]"
This seems broken, no? It seems that if the default option on InstallTypeDlg is used, the install path is populated with the default path ([ProgramFilesFolder]), rather than with the value appropriate to the user. If you move back-n-forth between InstallTypeDlg and FolderDlg, changing the default InstallType option, only then is the correct install path used.
========== Question #2 ==========
Assuming the same configuration as described in Question #1, I would like to remove the InstallTypeDlg, but keep the FolderDlg. I would like the install path shown on the FolderDlg to be populated with the "correct" path as appropriate for the user.
* If the user is an admin, the install path should be "C:\Program Files\[Manufacturer]\[ProductName]"
* If the user is a non-admin, the install path should be "C:\Program Files\<user>\Local Settings\Application Data\Programs\[Manufacturer]\[ProductName]"
(I realize those paths are slightly different across different Windows versions. I am using WinXP style paths for convenience.)
The user may manually change the install path, but the initial path should be appropriate to the user. The idea is that we provide a "recommended path" and if they change it to a folder for which they don't have sufficient permissions, that is their mistake.
Assuming the problem described in Question #1 is fixed, can I remove the InstallTypeDlg and still expect the install path on FolderDlg to be populated correctly for the user?
========== Question #3 ==========
When I run the same msi package on my Win7 machine as a non-admin user, the option selected by default on InstallTypeDlg is "Everybody". This differs from the behavior on my WinXP machine, where the default was "Only for me".
As I said earlier, I would like to avoid using the InstallTypeDlg, but if I am forced to use it (depends on the answer to Question #2) then I would like the default option to be appropriate for the current user.
* If the user is an admin, the default should be "Everybody"
* If the user is a non-admin, the default should be "Only for me"
Do I need to configure something else, or should this be calculated dynamically at install time?
========== Question #4 ==========
The Install Parameters documentation says that for the "Per Machine/User" install type,
The "previous one" refers to the "Per Machine" option.On Windows Vista or above this option has the same installation behavior as the previous one.
To me, this statement / comparison is misleading. If I configure my project as described above, using the "InstallTypeDlg" and "FolderDlg", then the "per-machine if user is administrator, per-user otherwise" option seems to behave the same on both WinXP and Win7 (which is good - that's what I want).
Maybe I am overlooking something, but based on my testing and the configuration I have described, the documentation is misleading. I only mention it because clearer documentation (hopefully) leads to less repeat questions on the forum.
========== ... ==========
Sorry this is so long and contains several questions, but all the questions are closely related and it seemed silly to post a separate topic for each.
Thanks for your help!
-Todd
FOLLOW US
Get the latest news in Application Packaging