tpatke
Posts: 24
Joined: Tue Nov 23, 2010 7:04 am

Per User Mixed Install

Sat Aug 07, 2021 7:44 am

Hi,

I am having two problems creating a per user mixed install. First, I cannot get the AI_InstallPerUser property to set the default. I have tried both as a private and public property. I have also tried setting the ALLUSERS property, but this cannot be set to the empty string as described here: viewtopic.php?t=28642

How can I set the default installation type?

Second, why do I have to allow a 'everyone' install for a mixed install? It is not an installation option that I want to support. It seems this is mostly a matter of setting defaults and then removing the InstallTypeDlg (a UI change). If the dialog must be present, how can I remove the 'Everyone' option? ...and also, the 'UAC' icon on the Install command which is incorrect for per user installs.

Per user mixed installs are actually really confusing for the user. One requires admin and one does not - and this is not made clear to the user as both appear to require admin. I would be happy to switch to a 64bit build to avoid this problem, but this would require supporting multiple installers. This seems silly. There must be a way to make this more straight-forward?

Thanks in advance,

Toby

Liviu
Posts: 1026
Joined: Tue Jul 13, 2021 11:29 am
Contact:  Website

Re: Per User Mixed Install

Fri Aug 13, 2021 7:05 am

Hello Toby,

If you want the “per-user” option to be selected as default on “InstallTypeDlg” dialog, you have 2 options:

  1. From the “InstallTypeDlg” dialog, select the “Only for me ()” radio button and in the “Properties” tab on the right panel change the “Selected” option value to “True”.
    per-user.jpg
    per-user.jpg (124.04KiB)Viewed 11601 times
  2. You can initialize the “ALLUSER” property as an empty string with the following values:

    Code: Select all

    {}
    or

    Code: Select all

     [|]

    If ALLUSERS is not set, the installer does a per-user installation.
    Add a “New Control Event” “Set installer property value” and configure like in the screenshot below:
    empty value.jpg
    empty value.jpg (148.13KiB)Viewed 11601 times
Please note that this option is selected by default if the user is a standard account, and the “Everybody” option is default if the user is admin.

If that is not what you meant, then can you please give us more details?
Second, why do I have to allow a 'everyone' install for a mixed install? It is not an installation option that I want to support. It seems this is mostly a matter of setting defaults and then removing the InstallTypeDlg (a UI change).
I’m not sure I understand your scenario, why would you remove the “Everyone” option if you have a mixed install?

When you select a mixed install which is “Per-machine if the user is an administrator, per-user otherwise”, the application will be installed "Per-machine" if the user has administrative rights and "Per-user" otherwise.
This is the default behavior when using mixed install.

The installation will be per-user with no UAC prompt only if the resources are installed in per-user locations. Besides this, the installation will also require the “InstallTypeDlg” dialog so the user can choose the per-user option.

How can I remove the 'Everyone' option?
You can do that by deleting the radio button option from the “InstallTypeDlg” dialog.
Right click on the “Everybody (all users)” option and delete it.
and also, the 'UAC' icon on the Install command which is incorrect for per user installs.
As detailed, the “UAC” on the “Install” button appears only if the user is an administrator.
I attached below 2 screenshots, in the left the installation is on a standard account and in the right on an admin account. As you can see, when the user is not admin the “UAC” icon is not there.
image.png
image.png (210.56KiB)Viewed 11601 times

Hope this helps, otherwise can you give us more details and maybe a test case?

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

tpatke
Posts: 24
Joined: Tue Nov 23, 2010 7:04 am

Re: Per User Mixed Install

Sat Aug 28, 2021 10:25 am

Thanks for the detailed reply Liviu. Apologies for the slow reply - I have been out of office.

Please note that I am using Advanced Installer Professional. I think some of the suggestions you made are not applicable to me as I cannot edit the install dialog. Can you please confirm the minimum price point needed tor per-user installs without the UAC? Looking at the differences between versions, I can see no reason why this should not be possible with the Professional version. https://www.advancedinstaller.com/feats-list.html

My use case is simple. I want to install a "Mixed 32/64-bit matching the platform" Package Type on a per user basis. Admin permission should not be required. I do not particularly care about 'all users', but if I must prompt then "per user" should be the default. The only way to install this package type without Admin is to use "Per-machine if user is administrator, per-user otherwise" WITH the InstallTypeDlg. Without the InstallTypeDlg Admin users will always receive a UAC prompt. Admin users should be able to install without the UAC, so the choice is necessary.

Why is the "Mixed 32/64-bit matching the platform" Package Type not supported with a "Per User Only" Installation Type? I feel like I am having to jump through a lot of hoops to support the "all users" option - which I don't even want.

Finally, note that my "Install" button is on the "Installation Type" page. The UAC icon on the install button should be shown depending on the radio button selection as the install type determines whether the UAC will be shown. Currently, it is always shown regardless of selection. This is incorrect and confusing. I have tested this with a non-admin user. Maybe if I were to add an additional confirmation page, the icon would not be shown?

Thanks again for your help.

Toby

Liviu
Posts: 1026
Joined: Tue Jul 13, 2021 11:29 am
Contact:  Website

Re: Per User Mixed Install

Tue Aug 31, 2021 10:17 am

Hi Toby,

I created a sample project. You can check it here: Mixed package type with per-user installation

Let us know if this helped!

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

tpatke
Posts: 24
Joined: Tue Nov 23, 2010 7:04 am

Re: Per User Mixed Install

Tue Aug 31, 2021 5:10 pm

That is a fantastic write up Liviu - thanks for your help! I have been working today to implement the instructions and am once again very pleased with the install process. All problems solved. ...I think. :-)

Thanks again,

Toby

Liviu
Posts: 1026
Joined: Tue Jul 13, 2021 11:29 am
Contact:  Website

Re: Per User Mixed Install

Tue Aug 31, 2021 6:41 pm

You are always welcome, Toby!

I'm glad it works now! Please let us know if there is anything else we could help you with and we will gladly assist.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”