Python 3 and a terminal. Steps 1–3 run on Linux, macOS or Windows — nothing in them is Windows-specific and nothing is installed.
Steps 4–5 need Windows. No administrator rights are required and nothing is modified: reg export copies values out to a text file and writes nothing back.
You need no registry experience. One idea carries the lab: every switch in the Settings app stores its answer as a value in the registry, so the state of a setting is a fact you can read rather than a memory of clicking something.
Why Windows Privacy Matters
Windows collects various types of data by default, including diagnostic information, location data, advertising preferences, and activity history. While some collection helps improve Windows, you have the right to control what is shared.
This tutorial walks through the most important privacy settings in Windows 10 and 11 so you can make informed decisions about your data.
Disabling the Advertising ID
Windows assigns a unique advertising ID to your account, used by apps to serve targeted ads.
While here, also consider disabling:
- "Let websites show me locally relevant content by accessing my language list"
- "Let Windows improve Start and search results by tracking app launches"
- "Show me suggested content in the Settings app"
Location and Camera Controls
Location Services
Navigate to Privacy & security > Location:
- Location services: Turn off entirely, or leave on and control per-app
- Location history: Click "Clear" to remove stored location data
- Review the app list and disable location for apps that do not need it
Camera and Microphone
Navigate to Privacy & security > Camera (and separately, Microphone):
- Review which apps have camera and microphone access
- Disable access for apps that should not need it
- Keep "Let desktop apps access your camera" enabled only if you use video calling apps
Most laptops have a physical LED that lights up when the camera is active. If it activates unexpectedly, investigate which app is using it.
Diagnostic Data Controls
Navigate to Privacy & security > Diagnostics & feedback:
Also click "Delete diagnostic data" to remove what has already been collected.
Activity History
Navigate to Privacy & security > Activity history:
- Uncheck "Store my activity history on this device"
- Click "Clear activity history" to delete existing records
Activity history tracks which apps and files you use, which feeds the Timeline feature and cross-device sync.
App Permissions Overview
Under Privacy & security, scroll down to the "App permissions" section. Review each category:
- Contacts, Calendar, Email: Only allow apps that genuinely need access
- Notifications: Controls which apps can read your notifications
- Account info: Controls access to your name, picture, and account details
- Documents, Pictures, File system: Restrict broad file system access
Some apps need certain permissions to function. For example, a video call app needs camera and microphone access. Review each setting based on whether the app genuinely needs it.
Now Do It Yourself: Check Whether Your Privacy Settings Are the Ones in Force
This page walked you through five settings screens. Each one ended with you clicking a toggle and trusting it. In fifteen minutes you can build something that reads all of them at once — and meet the one case where the screen shows your choice while something else quietly wins.
You need Python 3. Steps 1–3 run anywhere and produced every output shown below; steps 4–5 are Windows and are marked where they could not be re-run. Nothing in this lab writes to a registry — exporting is read-only.
Go: a terminal — Linux, macOS, or PowerShell on Windows. mkdir wprivlab then cd wprivlab.
Do: save this as user_export.reg. It is the format Windows itself produces, and it holds four of the settings this page walked you through — all switched off, the state you would be in after following it:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo]
"Enabled"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Privacy]
"TailoredExperiencesWithDiagnosticDataEnabled"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location]
"Value"="Deny"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\webcam]
"Value"="Deny"
You should see: one file. Each bracketed line is a registry key; each quoted line under it is a setting and its value.
Every toggle you clicked in Settings wrote one of these lines. The screens are a friendly front end to exactly this — which means “did that setting stick?” is answered by reading a value, not by remembering a click.
If not: if a later step reports nothing found, the backslashes were lost in copying — each key line needs single backslashes exactly as shown.
Go: the same folder.
Do: save this as audit.py. It turns raw registry values into plain English, and flags one specific situation you will meet in step 3:
import re, sys, pathlib
# Settings this lab knows how to explain: (key fragment, value name) -> (label, what "on" means)
KNOWN = {
("AdvertisingInfo", "Enabled"):
("Advertising ID", {"0": "off — apps get no shared ad identifier",
"1": "ON — apps share one identifier for you"}),
("Privacy", "TailoredExperiencesWithDiagnosticDataEnabled"):
("Tailored experiences", {"0": "off", "1": "ON — diagnostic data used to personalise"}),
("ConsentStore\\location", "Value"):
("Location access", {"Deny": "denied", "Allow": "ALLOWED for apps"}),
("ConsentStore\\webcam", "Value"):
("Camera access", {"Deny": "denied", "Allow": "ALLOWED for apps"}),
}
if len(sys.argv) < 2:
sys.exit("usage: audit.py <export.reg> [more.reg ...]")
# read every file given, so an exported policy branch can be audited
# alongside your own settings
text = "\n".join(pathlib.Path(f).read_text(encoding="utf-8", errors="replace")
for f in sys.argv[1:])
current, found = None, {}
policy = {}
for line in text.splitlines():
line = line.strip()
if line.startswith("["):
current = line.strip("[]")
continue
m = re.match(r'"([^"]+)"=(?:dword:0*([0-9a-fA-F]+)|"([^"]*)")', line)
if not m or current is None:
continue
name = m.group(1)
val = m.group(2) if m.group(2) is not None else m.group(3)
if m.group(2) is not None:
val = str(int(val, 16))
for (frag, vname), (label, meanings) in KNOWN.items():
if frag in current and name == vname:
target = policy if "\\Policies\\" in current else found
target[label] = (val, meanings.get(val, f"unrecognised value {val!r}"))
for label in sorted(set(found) | set(policy)):
if label in policy:
pv, pm = policy[label]
if label in found and found[label][0] != pv:
uv, um = found[label]
print(f" {label:<22} POLICY OVERRIDES YOU")
print(f" {'':22} you chose : {um}")
print(f" {'':22} enforced : {pm}")
else:
print(f" {label:<22} {pm} (set by policy)")
else:
print(f" {label:<22} {found[label][1]}")
Run it against your export:
python3 audit.py user_export.reg
You should see: every setting in one place:
Advertising ID off — apps get no shared ad identifier
Camera access denied
Location access denied
Tailored experiences off
Four settings that live on four different Settings screens, answered by one command. That is the practical value on its own — nobody re-clicks through thirty privacy screens to check, which is exactly why drift goes unnoticed for years.
If not: if the output is empty, the filename is wrong or the export lost its structure — run head -4 user_export.reg and confirm the first line reads Windows Registry Editor Version 5.00.
Go: the same folder.
Do: save this as policy.reg, in its own file. It is a Group Policy value — the kind an employer, a school, or some installed software can set:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\CurrentVersion\AdvertisingInfo]
"Enabled"=dword:00000001
Now run the audit over both files. audit.py takes as many as you give it:
python3 audit.py user_export.reg policy.reg
You should see: your setting and the enforced one, side by side:
Advertising ID POLICY OVERRIDES YOU
you chose : off — apps get no shared ad identifier
enforced : ON — apps share one identifier for you
Camera access denied
Location access denied
Tailored experiences off
🔴 Your choice is still recorded, and it is not the one in force. A value under HKEY_LOCAL_MACHINE\Software\Policies outranks the per-user setting, and the Settings app will keep showing your toggle as off. Nothing lies to you — the screen shows what you chose. It just never shows what wins.
This is not exotic. Managed work machines set policies by design, and some consumer software writes them during install.
If not: if the second run looks identical to the first, only one filename reached the command — both must be on the same line, separated by a space.
Go: a Windows Command Prompt or PowerShell — no administrator rights needed.
Do: export the two branches holding the settings from this page, then audit them:
reg export "HKCU\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" mine.reg
reg export "HKCU\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore" consent.reg
python3 audit.py mine.reg consent.reg
You should see: your real settings, reported the same way. Anything the auditor does not recognise is simply absent from its table — it reports only the four it knows.
Not re-run for this page — reg is Windows-only and this page was written on Linux. Steps 1–3 were run, and they carry the reasoning. The registry paths are Microsoft's documented locations for these settings.
Exporting is read-only. It copies values out to a text file and writes nothing back, so this is safe to run before you have decided anything.
If not: ERROR: The system was unable to find the specified registry key means that branch does not exist on your Windows version — export the ones that do and audit those. If python3 is not found on Windows, it is usually installed as py.
Go: the same Windows terminal.
Do: the branch that outranks your choices lives elsewhere. Export it too — on a personal machine it is often absent, and that absence is itself the answer:
reg export "HKLM\Software\Policies\Microsoft\Windows\CurrentVersion" policies.reg
You should see: either a file listing enforced settings, or ERROR: The system was unable to find the specified registry key — which means nothing is overriding you there.
Also not re-run here, for the same reason.
If the file does appear, add it to the audit — python3 audit.py mine.reg consent.reg policies.reg — and you will see any override exactly as step 3 showed it. A managed machine is not a broken one: if your employer enforces a setting, that is their decision to make on their hardware. What matters is knowing which of your choices are actually yours, and no Settings screen will tell you that.
If not: if the export succeeds on a personal machine and contains keys you never set, something installed them. That is worth investigating — note the key names before changing anything.
You switch off the Advertising ID in Settings. A week later you reopen Settings and it still shows off. From step 3, what have you actually confirmed? Answer: Only that your personal preference is still recorded. If a policy value exists under HKLM\Software\Policies it outranks your setting, and the screen will keep showing your choice regardless. Confirming what is in force means reading both locations — which is what the auditor does and what the Settings app does not.
Now do it without the page: export any single registry branch on a Windows machine and read it. Once you can match values to switches you have seen in Settings, you can audit anything Windows exposes — and you no longer depend on a screen agreeing to tell you the truth.
Summary
In this tutorial, you learned:
- How to disable the advertising ID for less targeted ads
- Managing location, camera, and microphone permissions
- Reducing diagnostic data collection
- Clearing activity history
- Reviewing and restricting app permissions
Revisit these settings after major Windows updates, as Microsoft sometimes resets preferences.