Set ComputerName in TS (CMD)

Change the “Computer” or “This PC” to %COMPUTERNAME% in a Task Sequence.

Use SetACL, by Helge Klein, to change owner, set appropriate permissions on the registry key and after changing the registry key, releasing the key back to the system.

Place the appropriate SetACL.exe and the script below, together with the registry key and execute from TS.

"%~dp0setacl.exe" -on HKEY_LOCAL_MACHINE\SOFTWARE\CLASSES\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D} -ot reg -actn setowner -ownr "n:S-1-5-32-544"
"%~dp0setacl.exe" -on HKEY_LOCAL_MACHINE\SOFTWARE\CLASSES\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D} -ot reg -actn ace -ace "n:S-1-5-32-544;p:full;s:y"
..
.. 
"%~dp0setacl.exe" -on HKEY_LOCAL_MACHINE\SOFTWARE\CLASSES\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D} -ot reg -actn ace -ace "n:S-1-5-32-544;p:read;s:y" "%~dp0setacl.exe" -on HKEY_LOCAL_MACHINE\SOFTWARE\CLASSES\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D} -ot reg -actn setowner -ownr "n:S-1-5-18" 

This script has only been tested on Windows 7, x64, through a TS