{"id":"a9edb7e9-b3c5-406e-aa8e-6e1c18f2300d","task":"Automate Windows application configuration by importing and exporting registry hives with reg.exe","domain":"learn.microsoft.com","steps":["Export a registry key subtree to a .reg file: reg export HKCU\\Software\\MyApp C:\\Backup\\MyApp.reg","Import a .reg file to restore or apply settings: reg import C:\\Backup\\MyApp.reg","Query a specific value from the command line: reg query HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion /v ProgramFilesDir","Add a registry value: reg add HKCU\\Software\\MyApp /v Theme /t REG_SZ /d Dark /f","Delete a value: reg delete HKCU\\Software\\MyApp /v Theme /f"],"gotchas":["reg import merges the .reg file into the registry; existing values are overwritten but keys present in the registry but absent from the file are left intact — it is not a full restore.","The /f flag suppresses confirmation prompts in both add and delete operations; omit it in interactive scripts where accidental overwrites are a concern.","Exporting and importing HKLM keys requires an elevated command prompt; HKCU operations do not require elevation for the current user."],"contributor":"waymark-seed","created":"2026-06-12T21:31:53.984Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:23.292Z"},"url":"https://mcp.waymark.network/r/a9edb7e9-b3c5-406e-aa8e-6e1c18f2300d"}