Microsoft Windows Registry Guide, Second Edition

Managing Windows Installer with Policies

Windows Installer provides a number of policies for managing how it installs applications and interacts with users. Some policies are more important and more useful than others; I'll get to that in just a bit. First here's the complete list of policies provided by Windows Installer. (The parentheses contain the policies' registry values.)

Of all these policies, the most useful are AlwaysInstallElevated, which loosens up security enough to allow restricted users to install applications; TransformsSecure, which stores transforms to prevent tampering; and the other policies that you can use to significantly restrict use of Windows Installer. Both ends of the spectrum–low and high security–are available to you.

Installing with Elevated Privileges

The policy InstallAlwaysElevated installs Windows Installer–based applications with elevated privileges. Microsoft documentation often calls this a privileged installation. This policy is one way to enable users to install applications that they couldn't otherwise install either because they're in restricted groups or you've locked down the desktops in your enterprise. Using Active Directory or something like Microsoft SMS (Systems Management Server) is a better way to deploy those applications. If neither product is available to you, consider using this policy, but keep in mind that the consequences of doing so can be severe.

These consequences can potentially result from the fact that users can take advantage of this policy to gain full control of their computers. Users could permanently change their privileges and circumvent your ability to manage their accounts and computers. In addition, using this policy can be an opportunity for viruses disguised as Windows Installer package files. For these reasons, this isn't a setting that I recommend in any but the most dire situations, in which there's no method available other than placing users into the local Administrators group.

For this policy to be effective, you must enable both the per-computer and per-user versions of it at the same time. In other words, enable it in Computer Configuration as well as in User Configuration.

TIP

Deploying applications to locked-down desktops is a common and tricky scenario. Using the AlwaysInstallElevated policy isn't the best solution, either. Other than the typical fare, such as Active Directory and SMS, elegant solutions do exist for this problem. Chapter 8, “Configuring Windows Security,” describes many of these solutions, including using Security Templates and Security Configuration And Analysis to mitigate security just enough to allow legacy programs to run in Windows. Chapter 18, “Fixing Common IT Problems,” shows you a few techniques for launching setup programs with elevated privileges.

Caching Transforms in a Secure Location

Transforms are essentially answer files for Windows Installer–based applications. Chapter 17, “Deploying Office 2003 Settings,” describes transforms, but chances are good that you already know all about them. Transforms, which you can build using the Custom Installation Wizard in the Microsoft Office 2003 Editions Resource Kit, customize the way in which an application installs.

When you install an application using a transform, Windows Installer stores the transform with an .mst extension in the Application Data folder of the user profile. Windows Installer needs this file to reinstall, remove, or repair the application. Keeping this file in the user profile ensures that the file is always available. For example, if users have roaming user profiles, the transform follows them from computer to computer. This is not secure, however. When you set the TransformsSecure policy, Windows Installer instead saves transforms in %SystemRoot%, where users don't have permissions to change files. But because Windows Installer requires access to the transform used to install an application, the user must use the same computer on which he or she installed the application or must have access to the original installation source to install, remove, or repair the software. The idea behind this policy is to secure transforms in enterprises when IT professionals can't risk users maliciously changing the files.

Locking Down Windows Installer

Table 13-1 describes the policies that provide the most security for Windows Installer–based applications and for Windows in general. The first part of the table contains per-user policies, and the second part contains per-computer policies. In the Setting column, “Not Configured” means that you don't define the policy. “Enabled” is self-explanatory.

Table 13-1 Secure Windows Installer Settings

Policy

Setting

User Configuration

Always install with elevated privileges

Not Configured

Prevent removable media source for any install

Enabled

Computer Configuration

Always install with elevated privileges

Not Configured

Enable user to browse for source while elevated

Not Configured

Enable user to use media source while elevated

Not Configured

Enable user to patch elevated products

Not Configured

Remove browse dialog box for new source

Enabled

Disable Windows Installer

Enabled for non-managed apps only

Prohibit patching

Enabled

Enable user control over installs

Not Configured

Disable IE security prompt for Windows Installer scripts

Not Configured

Cache transforms in secure location on workstation

Enabled

You can configure these policies directly in the registry. I gave you the key and value names earlier in this chapter. To enable a policy, add it to the appropriate key as a REG_DWORD value, and set it to 0x01. To disable the policy, set it to 0x00. Delete the value to remove the policy. These policies are typical of enterprise-style deployments, however, so I don't configure them in the registry, which is totally unmanaged. Instead, configure them using Group Policy locally or on the network so that you can manage them properly.

Категории