Changing a DWORD adds a trailing \0 character
Hi there.
I'm currently using this to have a linux live CD that allows me to deploy Windows installations. It's very handy as I can have a USB key with the perfect image of the Windows system I want, and still be able to change the settings needed, namely, here the computer name.
However, whenever I change the computer name editing the ControlSet001/Control/ComputerName/ComputerName/ComputerName.sz, the Windows installation thinks a \0 character has been added at the end of the dword.
This is visible by using the windows console, and echoing %computername%, followed by anything.
Example :
echo "Hi, %computername% says hello !"
returns
"Hi, EL01
Hexdump -C of the node before changing :
00000000 45 40 30 30 0a |EL00.| 00000005
And after
00000000 45 40 30 31 0a |EL01.| 00000005
I applied it to every registry node needed (computerName under ControlSet001/Control, Hostname under Tcpip, ...).
Please advise on a possible fix :)
SZ is a string type, not a DWORD type. The way winregfs works is by interpreting types other than BIN and unknowns; if you read a string, there will be a CR after the string because winregfs artificially puts one there. The program doesn't store the CR. I don't see any zero bytes in what you're showing me.
It's entirely possible that it's just not behaving nicely on your registry hive and corrupting it. I have had similar issues. I have not had the time or motivation to figure it out yet. Nonetheless, if you don't mind, send me one of the hives that gets messed up and I'll try to figure it out.
Hi.
Indeed, it's not a \0, but a line feed (most likely CR I guess). I saw that by exporting the broken node to a .reg file, and it showed a new line.
Nonetheless, it's slightly annoying :)
I'm gonna send you a link to my hive by email, I don't want it public here.
The nodes I edited : /ControlSet001/Control/ComputerName/ComputerName/ComputerName.sz /ControlSet001/Services/Tcpip/Parameters/Hostname.sz /ControlSet001/Services/Tcpip/Parameters/NV Hostname.sz
All of them had the same value before (EL00) and have the new (EL01 ) value.