Inno Setup - allowing user to choose "just me" or "anyone using this computer"

4.1k views Asked by At

Some installers I come across give me the choice of installing the app "just for me" or "for "anyone who uses this computer".

How can I get my Inno Setup script to present the user with this choice, so that I can then change what the installer does according to how they answer?

2

There are 2 answers

4
Oliver Giesen On BEST ANSWER

There's a lot of ways to interpret the answer to the "just me" vs. "all users" question. Just a few aspects off the top of my head:

  • The most common approach appears to be to simply control whether shortcuts (start menu, desktop, quicklaunch) are placed in the current user's profile or in the "All users" profile (which I personally find rather silly - what if I want more than one user - but not all - to use the app?).

  • Is the app itself installed into the user profile (Google Chrome-style) or to {programfiles}?

  • Are settings stored in the current user's profile or the All Users profile? Or maybe even directly inside the program folder (don't!)?

If you want to know how to create a wizard page with radio buttons to control this, check the section on using Custom Wizard pages in the InnoSetup help file. Look for the CreateInputOptionPage function and then use the returned TInputOptionWizardPage's Add method to add the radio buttons.

1
CubicleSoft On

As of InnoSetup 6, there is a new option called PrivilegesRequiredOverridesAllowed which can be either commandline or dialog. The dialog option causes a dialog to appear at the start of the setup that looks like this:

Installation mode dialog

Source: https://jrsoftware.github.io/issrc/whatsnew.htm