shelmers
Posts: 63
Joined: Thu Sep 03, 2009 9:02 pm
Location: Andover, Massachusetts USA

change current per-user install so IT admins can run it

Our current installer is set to install per user, which we've done for reasons related to the licensing of our app. However, an increasing number of our customers want to install while logged into an IT admin account on the user's machine. Naturally, a per-user install doesn't do any good because all of the shortcuts and reg entries are made for the IT admin account.

I used the advice in this article to switch to per-machine but most objects were not installed for anyone other than the Admin user. For example, I set "advertised" on for both the desktop shortcuts and items in the Application Shortcuts Folder and neither appeared for anyone other than the Admin user.

A couple of things to note:
  • The main "executable" for the app is not an exe; it's actually a dll that runs as an add-in to a Microsoft Office app.
  • There are multiple files that get installed in the user's personal folder.
  • There are reg entries that must be made per user.
  • There are multiple files that are installed in C:\Program Files (x86)\xyz.
I appreciate your assistance.
shelmers
Posts: 63
Joined: Thu Sep 03, 2009 9:02 pm
Location: Andover, Massachusetts USA

Re: change current per-user install so IT admins can run it

A further thought on my question above -- my real objective is to create an installer that can be used in either of two ways:

1) a user logs in with their own account, runs the installer, preferably without requiring admin rights, and ends up with a per-user install

2) an IT admin logs in to the computer's admin account, runs the installer and does a per-user install for a specific, named user who has an account on that machine; the end result should be the same as #1: a per-user install that is NOT for the admin account but for the named user's account.

As a fallback I can live with a per-machine install, but I would really like a per-user install that operates in either of the two ways described here.
Catalin
Posts: 7664
Joined: Wed Jun 13, 2018 7:49 am

Re: change current per-user install so IT admins can run it

Hello,

Thank you for your followup on this. Things are a bit more clear now.

In what regards this:
1) a user logs in with their own account, runs the installer, preferably without requiring admin rights, and ends up with a per-user install
This can be achieved by using the "Per-user only" installation type from the "Install Parameters" page.

However, this contradicts the following:
There are multiple files that are installed in C:\Program Files (x86)\xyz.
A program can not write to the "Program Files" folder without the user providing administrator rights.

This can pretty much be solved by using the "Per-user only (admin rights required)" installation type.

However, the above solution contradicts the first point ("preferably without requiring admin rights"), where you want the user to not be forced provide elevated privileges.

This:
There are multiple files that get installed in the user's personal folder.
and this:
There are reg entries that must be made per user.
can both be achieved by using the "Per-user only" installation type.
2) an IT admin logs in to the computer's admin account, runs the installer and does a per-user install for a specific, named user who has an account on that machine; the end result should be the same as #1: a per-user install that is NOT for the admin account but for the named user's account.
To be fully honest with you, I am not sure this is even possible. I have never heard of such case, where a user installs a setup for another user.

However, you can have a look on our "How to install a user specific file" article which I think you may find useful.

Although I am not quite sure if that is worth, you can try it and hopefully it may be of help for you.

As a conclusion, I think that the best option for your scenario would be to use the "Per-machine if user is administrator, per-user otherwise" installation type. This option is intended to work with the "InstallTypeDlg" dialog which can be added to your project by using the "Dialogs" page.

Hope this helps.

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

Return to “Building Installers”