GPO REG_SZ with control characters

Benedikt Wiesnet 1 Reputation point
2022-10-21T12:38:51.627+00:00

Hey guys,

I am having a weird problem. Obviously I am trying to set a registry value by GPO (which internally is somehow converted in XML Format). So I tried several times to import a REG_SZ Value from this export:

Windows Registry Editor Version 5.00  
  
[HKEY_CURRENT_USER\Software\VB and VBA Program Settings\XYZ\Allgemein]  
"License"="|'8@88'l5]5sc<0x14>389"  

As you can see there is a control character 0x14 which is ctrl+t inside this string and IT IS CORRECT UNFORTUNATELY. So every .REG to XML converter breaks here and leaves value empty or if I use GPO Wizzard from another pc it completely removes the entry.

My Idea was to convert it to hex this way:

Windows Registry Editor Version 5.00  
  
[HKEY_CURRENT_USER\Software\VB and VBA Program Settings\XYZ\Allgemein]  
"License"=hex(1):......00,63,00,14,00,33,00,38,... (just abbreviated it here at ctrl + t)  

Unfortunately Microsoft does not take hex strings in xml this way. Do you have any idea how to best deploy this reg value for each user on a domain computer?

Regards

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,293 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.