The only thing I've been able to do that successfully updates the registry in 64 bit environments is write an executable application to actually update the registry. Generally, I use VisualBasic and compile for x64 targets, but AutoIt works just as well. Here's an example script we used for disabling AutoLogin (our unattend has it set to 999 times, so that we can autologin as many times as necessary no matter how many times the computer needs to reboot). You will need to download AutoIt to edit / compile (Notepad++ or simply notepad will edit the script files [.au3], but it needs it's own compiler to get an exe out of it).
$LogonKey = "HKLM\Software\Microsoft\Windows NT\CurrentVersion\WinLogon\"
RegWrite($LogonKey, "AutoAdminLogon", "REG_SZ", 0)
RegWrite($Logonkey, "DefaultPassword", "REG_SZ", "")
$Form1 = GUICreate("Notification", 333, 128, 200, 125)
$Label = GUICtrlCreateLabel("", 40, 20, 250, 50, $SS_CENTER)
GUICtrlSetFont(-1, 9, 400, 0, "MS Sans Serif")
For $i = 10 to 1 Step -1
GUICtrlSetData($Label, "Registry Changes Written Successfully " & @CRLF & @CRLF & $i)
Just replace the variable $LogonKey's assignment to your key, and replace the values with what you need, and compile for x64 targets. Compile again for x86 for continuity with your other templates that deploy 32 bit Windows
Thanks, can do the same in WinBatch (compiling for x64). May pose this question to Support.
The problem with WinBatch is it still uses batch, which never worked for me. That said, I don't know if WinBatch executables will work or not, I'd be interested in hearing your results.
Can you update the registry entry as part of a batch file? And if you can run it as part of a batch file can you use the "Execute File" command from within the provisioning Template? And in doing that could you not elect to run the x64 task rather than the 32 bit solution?
So the answer to your question is 'Sort of'. The issue here is that the provisioning agent is a 32 bit app so running as 'Execute File' occurs in the 32 bit subsystem. My current solution for this in LDMS9.5.1 is to use software distribution action item and have the batch file package execute in 64 Bit mode on a 64 Bit OS. My problem in LDMS9.6.2 is that the new V9.6 agent uses the default task config which we need to inform End User of 'Success/Failure', this causes the provisioning task to hang till User acknowledges success.
So my solution is to change default behavior of Task to no display success for software distributions. The final resolution will be when Engineering corrects Provisioning agent to allow correct calls to the x64 handlers.