Enabling Windows Roles and Features During a Suite/Advanced UI Installation

InstallShield 2016

Project • This information applies to Suite/Advanced UI projects.

Edition • The Advanced UI project type is available in the Professional edition of InstallShield. The Suite/Advanced UI project type is available in the Premier edition of InstallShield. For information about the differences between these two project types, see Advanced UI Projects vs. Suite/Advanced UI Projects.

Some Windows functionality is disabled by default on target systems. In addition, some end users, or perhaps IT administrators, may choose to disable some Windows functionality. To manually enable or disable such Windows roles and features, they can use the Turn Windows features on or off link in the Programs and Features Control Panel.

If a particular package in your Suite/Advanced UI installation requires that one or more Windows roles or features be enabled on target systems, you can specify the required roles and features when you are configuring the package in your Suite/Advanced UI project. At run time, if an eligible package that is being installed requires one or more Windows roles or features that are disabled, the Suite/Advanced UI installation enables them before launching the package.

For example, your Suite/Advanced UI project may have a package that installs an IIS Web site that requires that the Internet Information Services feature in Windows be turned on. Another package in the same project may require that the PowerShell feature be turned on. When you are configuring the settings of those packages in your project, you can specify the Windows features that are required; at run time, if a package is eligible to be installed on a target system but any of its required Windows features are disabled, the Suite/Advanced UI installation enables those disabled Windows features before launching it. If the package is not eligible, its required Windows features are not enabled.

Note that during uninstallation, any Windows roles and features that the Suite/Advanced UI installation had enabled during installation are not removed; this helps avoid breakage of other products on the target system that require those roles and features.

InstallShield has built-in support for enabling several Windows features:

Internet Information Services
PowerShell
.NET Framework 3.x

InstallShield also lets you specify additional Windows roles and features that a package requires.

To specify a Windows role or feature that you want to be enabled if a particular package is eligible for installation:

1. In the View List under Organization, click Packages.
2. In the Packages explorer, click the package that you want to configure.
3. On the Common tab, in the Windows Features setting, click the Add New Windows Feature button, and then click one of the available feature options:
Internet Information Services
PowerShell
Microsoft .NET Framework 3.x
Custom—This option lets you specify any Windows feature that is not listed as an option in this setting.

InstallShield adds a new Windows Feature row under the Windows Features setting, and configures it as needed for any of the built-in feature options (Internet Information Services, PowerShell, or Microsoft .NET Framework 3.x). For the Custom option, the Windows Feature row contains a placeholder string for the name of a feature.

4. If you selected one of the built-in options, leave the value that InstallShield adds to the Windows Feature setting as is.

If you selected the Custom option: In the Windows Feature setting, enter the name of the Windows role or feature that you want to be enabled. The name that you enter for any custom option should be the string that tools such as Deployment Image Servicing and Management (DISM.exe) and Package Manager (Pkgmgr.exe) use to identify the role or feature on a particular version of Windows.

For a list of available Windows roles and features on each version of Windows for which you are supporting, see Microsoft TechNet.

Special Considerations for Enabling Windows Roles and Features

Availability of Windows Roles and Features on Various Versions of Windows

The support for enabling Windows roles and features is available for target systems that have Windows Vista or later or Windows Server 2008 or later. The list of Windows roles and features that can be enabled on a given target system varies, depending on the version of Windows that is present. In addition, different versions of Windows may use different strings for the same role or feature.

If a Suite/Advanced UI installation attempts to enable a Windows role or feature that is not available on a target system, the Suite/Advanced UI installation fails and writes error 0x800f080c in the log file.

Thus, in some scenarios in which you are specifying required Windows roles and features, you may want to use a package’s Eligibility Condition setting to identify the appropriate operating system versions that correspond with the required Windows role or feature that you are selecting for the package. To target multiple versions of Windows, each with a different string for the name of the Windows role or feature that you are enabling, consider adding the package to your project multiple times. For each instance of the package, use the package’s Windows Features and Eligibility Condition settings to specify the appropriate string for the corresponding target operating systems.

Note that some roles and features may not only be disabled on some versions of Windows; they also may not be installed. If a Suite/Advanced UI installation is configured to enable a Windows role or feature that is not installed on a target system, the Suite/Advanced UI installation attempts to install the role or feature. If the role or feature cannot be installed, the Suite/Advanced UI installation fails. An example of a Windows feature to which this scenario may apply is the .NET Framework 3.x feature, which may not be installed by default on Windows 8 systems. The payload for this feature is available only through Windows Update. If an Internet connection is not available, or if the system is configured to obtain updates through Windows Server Update Services instead of Windows Update, the Suite/Advanced UI installation cannot install and enable the .NET Framework 3.x feature.

Identifying Dependencies for a Required Windows Role or Feature

Some Windows roles and features depend on other Windows roles or features. One way to determine whether a disabled role or feature has any dependencies is to run the following command from an elevated Command Prompt window (which you can launch by right-clicking a shortcut for cmd.exe and then clicking Run as admin):

dism /online /enable-feature FEAT-NAME

In this example, FEAT_NAME is the name of the disabled feature that you are checking. If the aforementioned command works, the feature has no dependencies. If it fails, the error lists the dependencies.

If the role or feature that you are enabling for a package requires one or more roles or features that may be disabled on target systems, ensure that you also specify the dependency features in the package’s Windows Features setting.

Run-Time Behavior for Enabling a Windows Role or Feature

If a Suite/Advanced UI installation enables a Windows role or feature on some target systems, the InstallationProgress wizard page of the Suite/Advanced UI installation can show the progress of the role or feature being enabled. This progress information is available on target systems that have Windows 8 or later or Windows Server 2012 or later. On these target systems, a Suite/Advanced UI installation uses DISM APIs to enable roles and features, and these APIs have support for reporting the progress information.

On Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2 target systems, a Suite/Advanced UI installation uses Pkgmgr.exe to enable roles and features. Pkgmgr.exe does not have support for reporting progress information; therefore, on these systems, the progress bar cannot updated as roles and features are being enabled.

Although DISM.exe is available on Windows 7 and Windows Server 2008 R2 systems, the API support is not shipped on these versions of Windows. In addition, the API DLL dependencies are not available for redistributing to target systems.

See Also