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

Per-machine if admin, per user otherwise

Sat Sep 04, 2021 8:41 am

Hi,

I have an installer working on a per-user basis which covers 99% of my install scenarios brilliantly, but... In some admin scenarios my application needs to be installed silently by an administrator who is not the target user. In this case, the install should be for ALLUSERS.

In fact, an installation type of "Per-machine if user is administrator, per-user otherwise" is exactly what I want. The problem is that the only way I can get this to behave as expected is to add a InstallTypeDlg. With this dialog, I am prevented from setting the APPDATA directory dynamically (Program Files for Admin, AppData for Users). Without this dialog, the user receives a UAC prompt every time.

This solution really bugs me. I already know the correct choice based on the type of user. The install I want is "Per-machine if admin, per user otherwise". I should be able to handle both scenarios as a two click install with the Surface theme and the InstallDlg. That is: InstallDlg, ProgressDlg, ExitDialog.

I have been scouring your forums for hours and have tried all manner of power shell inline custom events with and without the ALLUSER setting, but I just cannot get it to work. What is so special about the InstallTypeDlg? How can I duplicate this behavior with a powershell script and jump straight into InstallDlg? What does an install type of "Per-machine if admin, per user otherwise" mean? What is it supposed to do?

Maybe I need two installers - one for per-user and one for all-users? I think this might be preferable to showing the InstallTypeDlg.

Please note the I am using the Professional license of your product. I can upgrade to Enterprise if required, but it is not clear it will help in this case.

Thanks in advance,

Toby

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

Re: Per-machine if admin, per user otherwise

Sat Sep 04, 2021 11:40 am

I am experimenting with the Enterprise license and it looks like I can work around my issues with this version. As my concerns are largely user-experience related rather than functional I think the upgrade makes sense.

Thanks,

Toby

Catalin
Posts: 6510
Joined: Wed Jun 13, 2018 7:49 am

Re: Per-machine if admin, per user otherwise

Mon Sep 06, 2021 12:01 pm

Hello Toby,

As per our documentation, the "per-machine if user is administrator, per-user otherwise" installation type requires the "InstallTypeDlg" dialog to be present in "Dialogs" page.

If you would like to automate this process, I have written some time ago an article regarding this:

InstallTypeDlg - Automatic selection accordingly with user's rights.

I am also glad you managed to work this around using our Enterprise suite.

Please let us know if there is anything else we could help you with and we will gladly assist.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

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

Re: Per-machine if admin, per user otherwise

Mon Sep 06, 2021 12:10 pm

Thanks Catalin - that's a great write up. I will take a closer look and see if I can improve on what I have with the Enterprise project.

Toby

Catalin
Posts: 6510
Joined: Wed Jun 13, 2018 7:49 am

Re: Per-machine if admin, per user otherwise

Mon Sep 06, 2021 12:16 pm

You are always welcome, Toby!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”