I’m trying to change a pre-existing registry key on Windows and nothing I have tried is working. First, I tried using the regset/regdelete commands, but nothing happened. The task sequence completed successfully, but the registry key’s value does not change.
regset “[HKLM\SOFTWARE\Application Software\AppName\Subkey]” “File”=string:1234
I even tried with regset64 instead of regular regset. The target OS is Windows 10 x64. No luck. I created a batch file to do this interactively on Windows, which succeeded. I placed the batch file’s syntax into the task inside of a createfile block. Again, task sequence completes successfully, but doesn’t change the key’s value.
createfile until EOF
reg delete “HKLM\SOFTWARE\Application Software\AppName\Subkey” /v “File” /f
reg add “HKLM\SOFTWARE\Application Software\AppName\Subkey” /v “File” /t REG_SZ /d “1234” /f
move __createfile regadd.cmd
The target registry entry is a REG_SZ despite the numerical values. What am I doing wrong?