The Big Picture: The Boss's Rules vs Your Choices

Think of a company. You may arrange your own desk however you like. But if the manager says "all desks must be clear at night", that rule wins. It does not matter what you prefer.

Windows has the same idea, called policy. A policy is a rule set by an administrator (or a company's IT team) about how Windows must behave. The main tool for setting policies is Group Policy. A later chapter (the Group Policy chapter) covers it in full. This section covers only the part that touches the registry: policies are stored as registry values, and they win over normal user settings.

YOU CHOOSE                 POLICY SAYS               WHAT HAPPENS

"Show Task Manager"  +  "Task Manager disabled"  ►  Task Manager is blocked,
                                                    and its menu may be greyed out

Where have you seen this? On a work laptop, a setting in the Settings app is greyed out and says "Some settings are managed by your organization." That message appears because a policy value is present in the registry.

8.1 Policy Keys vs Regular Keys

What it is: Policy settings are written to special keys that are kept apart from regular settings. Programs that respect policies check these keys.

The two common places:

Policy locationNotes
HKLM\SOFTWARE\Policies\...Machine policies. The most common home of modern policies
HKCU\SOFTWARE\Policies\...User policies
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\...Older, also still used
HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\...Older user version

Examples:

Policy (in plain words)Registry location (shape)
Turn off Windows Update's automatic restartHKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU
Block a browser settingHKLM\SOFTWARE\Policies\<browser maker>\...
Disable Task Manager for a userHKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System, value DisableTaskMgr

(The exact paths come from each policy's documentation. Do not copy them from memory. Treat the table as showing the shape of policy locations.)

Regular key vs policy key:

Regular keyPolicy key
Typical pathHKCU\Software\Vendor\App...\Software\Policies\Vendor\App
Who writes itThe program or you (Settings app, regedit)The policy client, as it applies Group Policy
Can a standard user write it?For HKCU, yesNo. The policy keys are protected so standard users cannot alter them
Meaning"What was chosen""What the administrator requires"
What happens at the next policy refreshThe value staysThe policy client may rewrite or delete the policy values

Who writes the policy values? The Group Policy client (a part of Windows that runs as a service, see Chapter 12) reads the policies from the company's servers or from the PC's local policy, then writes the matching values into these keys. It does this at boot, at sign-in, and about every 90 minutes (with a random offset) in the background. You can force it with:

gpupdate /force

Home vs Pro. On Windows Home, there is no Local Group Policy Editor (gpedit.msc). People still set policy values there by editing the registry directly. Some features reached this way may not be officially supported on Home, so this is a use-at-your-own-risk area.

Windows tip. Open regedit and look at HKLM\SOFTWARE\Policies. On a personal PC with no policies, it is usually small or empty. On a work PC, it may hold dozens of entries. Browsing is safe; editing is not (see Section 10).

Reading a policy value safely:

reg query "HKLM\SOFTWARE\Policies" /s

/s means "also show all keys inside". If the key does not exist, you will see "unable to find the specified registry key", which just means no policies are set there.

8.2 Policy Precedence over User Settings

What it is: Precedence means "which one wins when two disagree". For most settings, policy beats the user's choice.

The usual order (strongest first):

STRONGEST
   1.  Policy values          (...\Software\Policies and ...\CurrentVersion\Policies)
   2.  User's own settings    (HKCU\Software\...)
   3.  Machine defaults       (HKLM\Software\...)
   4.  Program's built-in defaults
WEAKEST

(The exact order depends on the program. This is the general idea that many Windows features follow.)

How it works in practice. A well-behaved program (or Windows itself) checks the policy key first:

Program wants to know:  "Is the feature on?"

   Is a policy value present?
        ├── yes ──► use the policy; ignore the user's setting;
        │           often show the control greyed out
        └── no  ──► use the user's setting (HKCU), then machine default

Why the policy cannot be undone by users.

  1. The policy keys are protected (Section 6), so a standard user cannot change them.
  2. Even if an administrator edits the value by hand, the policy client rewrites it at the next refresh, so the change does not last. (The next refresh can be forced with gpupdate /force.)
  3. Many policies are enforced by services or by the program itself, which re-read the key whenever it changes (Section 11).

Local policy vs domain policy. There are two sources. Local policy is set on the PC itself. Domain policy comes from a company server (a domain is a group of PCs managed together). When both set the same item, the domain policy normally overrides the local policy. The Group Policy chapter explains the order in detail.

Policy that "sticks" after removal. Some old policy methods write values and do not remove them when the policy is turned off ("tattooing"). Modern policies are written to the dedicated Policies keys, which the client cleans up. If a setting stays locked after you removed a policy, look in the registry for a leftover value under Policies, and write down or export it before removing (Section 10).

Troubleshooting.

SymptomLikely causeWhat to do
A setting is greyed out with "managed by your organization"A policy value existsAsk IT, or find the value under a Policies key
A setting resets after you change it in regeditThe policy client rewrites itChange the policy, not the value
gpedit.msc is not foundWindows HomeEdit the registry, with care, or use a supported option
Not sure which policies applyRun gpresult /rIt lists the policies applied to this PC and user

Summary

TopicRemember this
PolicyA rule set by an administrator, stored as registry values
Policy keys...\Software\Policies and ...\CurrentVersion\Policies
Who writes themThe Group Policy client (at boot, sign-in and about every 90 minutes)
Standard usersCannot change policy keys
PrecedencePolicy wins over the user's own choice
Manual editsUsually overwritten at the next refresh
Windows HomeNo gpedit.msc; policies set only through the registry
Useful commandsgpupdate /force, gpresult /r, reg query
More detailA later chapter covers Group Policy in full