Add registry key via batchfile
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
Add quotation marks around the subkey
REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList" /v "MyCustomWorkgroupUsername" /t REG_DWORD /d 0