AlexP
Posts: 1
Joined: Mon Oct 22, 2012 4:01 pm

Per-machine and per-user installations on Windows 7

I'm creating a single-exe mixed mode (32/64 bit) package that should install per-machine if user is admin or per-user otherwise. On Windows XP it works as expected, but on Windows 7 UAC prompt that requests admin password appears after configuration UI. I've tried various solutions but none of them helped:
* Setting MSIUSEREALADMINDETECTION=1 changes Privileged variable to correct value for non-admin in UI sequence, but UAC prompt appears after UI sequence anyway.
* Adding standard installation type dialog that asks if i want per user or per-machine installation. UAC appears regardless of choosing "Just me" or "Everyone".

One part of the documentation states that this type of installation is not supported and will revert to per-machine installation on Vista and above (http://www.advancedinstaller.com/user-g ... eters.html), but another says that single package authoring should work on windows installer 5 that is present on windows 7 (http://www.advancedinstaller.com/user-g ... ckage.html).
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Per-machine and per-user installations on Windows 7

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

I'm afraid the settings which you are trying are incompatible because when you set the package type to mixed the application install location (APPDIR property) will be set by the AI_ProgramFiles property which will redirect the package to the correct Program Files folder. So, when you are using mixed package type the installation context will always be set to per-machine.

The only solution for this is to create two separate MSI packages, x86 and x64, and use in each of them the predefined support we offer for per-machine/per-user installs.

If you want single setup package, you would need to create your own wrapper that bundles the two MSI and launches the correct one, based on the OS architecture.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mclellac
Posts: 3
Joined: Mon May 14, 2007 11:06 pm
Location: Calgary

Re: Per-machine and per-user installations on Windows 7

I'm using AI 10.7 and I want to create a single-exe mixed mode (32/64 bit) package. You state "when you are using mixed package type the installation context will always be set to per-machine", however, I cannot select an Installation Type of Per-machine. I get the error "The package type is not compatible with selected installation type".

How can I make the [ProgramMenuFolder] property resolve to "C:\Documents and Settings\All Users\Start Menu\Programs"?

Thank you for your help.
mclellac
Posts: 3
Joined: Mon May 14, 2007 11:06 pm
Location: Calgary

Re: Per-machine and per-user installations on Windows 7

I was able to select Package Type: Mixed 32/64-bit matching the platform and
Installation Type: Per-machine only (fails if user is not administrator) so everything seems to install fine. For some reason, I couldn't make these selections when I tried earlier.
Thanks.
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Per-machine and per-user installations on Windows 7

Hello,

I'm glad you got this working.
I get the error "The package type is not compatible with selected installation type".
I've tested your scenario and I was able to replicate the behavior. For example this may happen if you choose a per-user only installation type, then choose a mixed package type and then you want to set the installation type to per-machine only. This is caused by an Advanced Installer limitation. A fix will be added in a future version of Advanced Installer, thank you for bringing this to our attention. Until then, as a workaround, in order to avoid this issue you can proceed like this:
- set the package type to 32-bit
- set the installation type to per-machine only
- set the package type to mixed package

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Per-machine and per-user installations on Windows 7

Hello,

This was fixed in version 11.1 of Advanced Installer released on April 28th, 2014.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”