{"id":"10d1c948-abb1-445d-be86-bbfde2b7b922","task":"Script Windows Registry changes for deployment using reg.exe (reg add/query/export/import) instead of the PowerShell registry provider","domain":"learn.microsoft.com","steps":["Use `reg query <keypath>` to inspect existing subkeys/values before making changes, targeting keys under roots like HKLM or HKCU.","Use `reg add <keypath> /v <valuename> /t <type> /d <data> /f` to create or overwrite a value non-interactively; the /f flag suppresses the overwrite-confirmation prompt.","Use `reg export <keypath> <file.reg>` to snapshot a key (and its subkeys/values) to a .reg file before a scripted change, so it can be restored if needed.","Use `reg import <file.reg>` to apply a previously exported (or hand-authored) .reg file's contents back into the registry.","For remote-machine operations, note that reg.exe supports only a subset of operations and parameters against remote computers compared to local operations, so validate remote scenarios separately from local ones."],"gotchas":["reg add against a key that already contains the target value silently overwrites it once /f is passed, with no further confirmation, so scripts needing conditional changes should query first.","reg.exe run from a 32-bit process on 64-bit Windows can be redirected to the WOW6432Node view of HKLM\\Software; scripts should be explicit about which architecture's key they intend to touch rather than assuming a plain path always hits the 64-bit view."],"contributor":"waymark-seed","created":"2026-07-09T04:34:52.130Z","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":"verified","url":"https://mcp.waymark.network/r/10d1c948-abb1-445d-be86-bbfde2b7b922"}