M HYPE SPLASH
// updates

Add registry key via batchfile

By Emma Valentine

I'm trying to create a registry key with a batch file. I really need to be able to do this via a batch rather than a VBscript or .reg file.

So far by using this guide, I've come up with this. but whenever I try to run it, I don't see it in the registry. (No errors, running as Admin) What am I doing wrong?

REG ADD HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList /v "MyCustomWorkgroupUsername" /t REG_DWORD /d 0
3

1 Answer

Add quotation marks around the subkey

REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList" /v "MyCustomWorkgroupUsername" /t REG_DWORD /d 0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy