By default, "Mixed 32/64-bit matching the platform" Package type is not compatible with “Per-user only” installation type.
This happens because our mixed package type makes some changes which work on per-machine only, for example modifying registry and folder location which a per-user can not access.
In the "Mixed 32/64-bit matching the platform" Package type, Advanced Installer defines the “AI_ProgramFiles” property that will point to the system program files (C:\Program Files\) on both platform types. As we can see this location is not compatible with "Per-user only".
However, there is a method we can use to conditionally install the application resources based on the OS bitness.
As detailed in our Advanced Installer Package Types article, the "32-bit package" can be installed on both 32-bit and 64-bit platforms.
1. Create a new project.
2. From the "Install Parameters" page, we select the "32-bit package" type and "Per-user only" installation type.
3. Now, from the "Files and Folders" page we can create 2 folders under "Application Folder":
- x86 res
- x64 res
5. Now we add the resources we want on a "32-bit" machine on the "x86 res" folder and the resources for "64-bit" machine on the "x64 res" folder. For this demo I added a "x64.txt" txt file into the "x64 res" folder and "x32.txt" txt file into "x86 res" folder.
6. On the "Organization" page, we create 2 new features:
- x64
- x86
8. Select the "x86" feature and on the "Not installed if" option add "VersionNT64".
9. Now we go back to the "Files and Folders" page, right click on the "x64 res" folder → Move To Feature, select the "x64" Feature from the list and click "Ok". Do the same for the "x86 res" folder.
After that, based on the machine type where our application is installed, the "Per-user" install contains only the specific resources.
For example, on my per-user install after installing the application, only the 64-bit resources were installed since my machine is 64-bit type. In the below screenshot is the result: The sample project is attached to this thread, so if you are interested to take a look directly at my project, you are more than welcome to download the project file.
Best regards,
Liviu