Is it possible to modify a registry value (whether string or DWORD) via a .bat/.cmd script?
To open the Command Prompt as an admin, type “cmd” in the Windows search bar. Next, right-click the “Command Prompt” app in the search results, and select “Run As Administrator” from the menu. Command Prompt will now open in admin mode, and we can begin editing the Windows registry.
Click Start, click Run, type regedit in the Open box, and then click OK. Locate and then click the subkey that holds the registry item or items that you want to change. Click File, and then click Export. This step backs up the subkey before you make any changes.
@Franci Penov - modify is possible in the sense of overwrite with /f
, eg
reg add "HKCU\Software\etc\etc" /f /v "value" /t REG_SZ /d "Yes"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With