InstallShield 2019 Express Edition
One of the goals of Windows Vista and later, as well as User Account Control (UAC), is to allow users to run as standard users all of the time. Elevation should rarely be required; if it does occur, it should occur for as short of a duration as possible.
Several different areas of InstallShield affect whether an installation triggers UAC consent or credential prompts for elevated privileges. Understanding these different settings will help you create the appropriate UAC experience for your installation when end users run it on Windows Vista and later systems. It will also enable you to try to minimize the number of UAC prompts that are displayed during your installation.
Depending on how it is configured, an installation that includes InstallShield prerequisites may prompt for elevated privileges on Windows Vista and later systems at several different points during the installation:
1. | When the end user launches the Setup.exe file |
2. | When the Setup.exe file launches a setup prerequisite that requires elevated privileges |
3. | When the ISInstallPrerequisites custom action relaunches the Setup.exe file in feature prerequisite installation mode because one or more of the features being installed has an associated feature prerequisite |
Note that the ISInstallPrerequisites custom action does not verify whether any feature prerequisites require elevated privileges before the prompt for elevated privileges is displayed. In addition, the ISInstallPrerequisites custom action does not check the conditions on any of the feature prerequisites to determine whether the feature prerequisites need to be installed. The prompt for elevated privileges is always displayed.
4. | When the Windows Installer begins the Execute sequence of the .msi package |
UAC-Related Settings in InstallShield
Following is a list of the InstallShield settings that help determine whether UAC prompts are displayed during an installation on Windows Vista and later systems:
• | Required Execution Level—Use this setting on the Setup.exe tab in the Releases view to specify the minimum execution level required by your installation’s Setup.exe file. InstallShield uses the value that you select (Administrator, Highest available, or Invoker) in the application manifest that it embeds in the Setup.exe launcher. For more information, see Specifying the Required Execution Level for Your Setup Launcher on Windows Vista and Later Platforms. |
• | Requires Administrative Privileges (for an InstallShield prerequisite)—The Details pane for InstallShield prerequisites in the Redistributables view has this read-only setting that indicates whether administrative privileges are required in order to install the prerequisite. |
• | Require Administrative Privileges (General Information view)—Use this setting in the General Information view to specify whether the Execute sequence of your installation’s .msi package requires administrative privileges. If you set this to No, InstallShield sets bit 3 in the Word Count Summary property to indicate that elevated privileges are not required to install your product. For more information, see General Information View. |
In addition, the type of InstallShield prerequisite—either setup prerequisite or feature prerequisite—may affect whether UAC prompts are displayed during an installation on Windows Vista and later systems. To learn more about these two types of InstallShield prerequisites, see Setup Prerequisites vs. Feature Prerequisites.
Note the following UAC-related behavior on Windows Vista and later:
• | If Required Execution Level is set to Invoker, any InstallShield prerequisites in your installation do not require administrative privileges, and Require Administrative Privileges in the General Information view is set to No, end users should see no UAC prompts during installation. |
• | If Required Execution Level is set to Invoker, your installation includes setup prerequisites that require administrative privileges, and Require Administrative Privileges in the General Information view is set to No, end users should see one UAC prompt—plus up to one additional UAC prompt for each reboot—during installation. |
• | If the full user interface of the setup launcher is displayed and the installation includes setup prerequisites that need to be installed, the setup launcher typically displays the setup prerequisite dialog before the main installation starts. If one or more of the setup prerequisites that need to be installed require administrative privileges, the Install button on the message box has the shield icon to alert the end user that elevated privileges are required. |
• | If the installation is continuing after a reboot and privileges must be elevated, the OK button of the continuation message box has the shield icon. If privileges do not need to be elevated, the shield button is not displayed. |
• | If your installation includes more than one setup prerequisite that must be installed on a target machine and one or more of those setup prerequisites requires administrative privileges, the UAC prompt is displayed before the first setup prerequisite is installed. This may allow elevated privileges to be used for all prerequisites without requiring separate UAC prompts for each prerequisite installation. Note, however, that if a setup prerequisite installation causes a reboot, administrative privileges are lost, and a UAC prompt may be displayed if any of the remaining prerequisites require administrative privileges. |
• | If your installation includes more than one setup prerequisite that must be installed on a target machine and one or more of those setup prerequisites requires administrative privileges, the UAC prompt is displayed before the first setup prerequisite is installed. This may allow elevated privileges to be used for all prerequisites without requiring separate UAC prompts for each prerequisite installation. Note, however, that if a setup prerequisite installation causes a reboot, administrative privileges are lost, and a UAC prompt may be displayed if any of the remaining prerequisites require administrative privileges. |
A slightly different behavior applies to feature prerequisites. If your installation is going to install any features that are associated with prerequisites, the UAC prompt is displayed when the ISInstallPrerequisites custom action relaunches Setup.exe in feature prerequisite installation mode. This occurs regardless of whether any of the feature prerequisites require elevated privileges. It also occurs before any of the feature prerequisites’ conditions are evaluated to determine whether the feature prerequisites need to be installed. Note that if a feature prerequisite installation causes a reboot, administrative privileges are lost. After the reboot, the ReadyToInstall dialog is displayed again, and the end user needs to click the Install button to proceed with the rest of the installation. In this case, the UAC prompt is displayed again when the ISInstallPrerequisites custom action relaunches Setup.exe in feature prerequisite installation mode.
• | Note that if Require Administrative Privileges in the General Information view is set to No but your .msi package tries to perform a task for which it does not have adequate privileges, Windows Installer may display a run-time error. |
• | If privileges are elevated at the end of an installation and the Setup Complete Success dialog launches the product, elevated privileges are carried over to your product. In most cases, running an application with elevated privileges is discouraged. |
Example: UAC Prompt Is Displayed for Setup.exe and After a Reboot for a Prerequisite that Requires Administrative Privileges
The following diagram shows when Windows Vista and later request elevated privileges for standard users or administrative users who have limited privileges. The example is based on the default UAC settings on Windows Vista and later systems. The diagram shows an installation that requires elevation for Setup.exe, two setup prerequisites, a feature prerequisite, and the Execute sequence of the .msi package. Because the Setup.exe file has a manifest that specifies Administrator as the required execution level, elevated privileges are used for each part of the installation. The second UAC prompt is displayed because elevated privileges are lost during a reboot.
Diagram of an Installation that Has Administrator as the Required Execution Level
See Also
Run-Time Behavior for an Installation that Includes InstallShield Prerequisites
Setup Prerequisites vs. Feature Prerequisites
Using Windows Installer with UAC (Windows Installer Help Library)
Guidelines for Packages (Windows Installer Help Library)
Authoring Packages without the UAC Dialog Box (Windows Installer Help Library)
Installing a Package with Elevated Privileges for a Non-Admin (Windows Installer Help Library)
InstallShield 2019 Express Edition Help LibraryApril 2019 |
Copyright Information | Flexera |