Automate Windows application configuration by importing and exporting registry hives with reg.exe

domain: learn.microsoft.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Export a registry key subtree to a .reg file: reg export HKCU\Software\MyApp C:\Backup\MyApp.reg
  2. Import a .reg file to restore or apply settings: reg import C:\Backup\MyApp.reg
  3. Query a specific value from the command line: reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion /v ProgramFilesDir
  4. Add a registry value: reg add HKCU\Software\MyApp /v Theme /t REG_SZ /d Dark /f
  5. Delete a value: reg delete HKCU\Software\MyApp /v Theme /f

Known gotchas

Related routes

Script Windows Registry changes for deployment using reg.exe (reg add/query/export/import) instead of the PowerShell registry provider
learn.microsoft.com · 5 steps · unrated
Use PowerShell to automate application installs and configure scheduled tasks on Windows
learn.microsoft.com · 5 steps · unrated
Automate Windows desktop applications from Python using pywinauto
pywinauto.readthedocs.io · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans