Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Registry oddity

May
12,834
163
There are other, similar, examples of this in the "HKCU\JP Software" key.

Regedit shows this.

1577809756981.png


REGDIR shows this. Notice that the data for the value "Title" appears on two lines and is followed by an apparently extraneous newline.

1577809939710.png


I see the same thing in a project where I simple use wprintf() on the data. Copying that data in regedit's "Edit string" dialog and pasting it anywhere suggests that the string is actually L"Watch List\nWatch\n".

Is that correct ... and WAD?
 
Try right clicking the value in Regedit and choosing Modify Binary Data to see exactly what's there.
Thanks. I didn't think that would work for a REG_SZ but it does. The string is, in fact, "Watch List\nWatch\n".

Now that I think of it, I suppose it's WAD ... that the string is doing double-duty ... specifying the tab's balloon description and its title.
 
Sure, that should work for everything since some of the input fields don't actually support all the types of data that can be stored. I've opened REG_MULTI_SZs with blank lines, edited them, and then told that blank lines aren't supported and they'll be removed. Uh.. ok..! Heh

Ah, that's very cool.
 
Sure, that should work for everything since some of the input fields don't actually support all the types of data that can be stored. I've opened REG_MULTI_SZs with blank lines, edited them, and then told that blank lines aren't supported and they'll be removed. Uh.. ok..! Heh

Ah, that's very cool.
You were told they weren't supported? How were you told?

In REGEDIT, I created a test REG_MULTI_SZ with a blank line and REGEDIT silently removed the blank line.

I suppose they'd be a little tricky to implement since a blank line in a MULTI_SZ (two NUL characters in a row) looks exactly like the end of a MULTI_SZ.
 
They ARE supported, just not by regedit itself, unfortunately.

Yes, hence my "Uh.. ok..! Heh". ;)

You were told they weren't supported? How were you told?

In REGEDIT, I created a test REG_MULTI_SZ with a blank line and REGEDIT silently removed the blank line.

Ah.. that was up through Windows 7. I'd never actually done it in Windows 10 until just now since you asked. There's no warning about it on Windows 8.1 either. I'm not surprised given how M$ continues to gut the interface post Windows 7. No clue why they'd actually go out of their way to remove that helpful little tidbit of information, as misleading as it was since it actually is supported, but at least they felt like letting you know back then that what you typed isn't what is stored.

1578621246154.png
 
reg add hklm\software\wendy /f /v test /d Test^nLine

This will put a string, which when viewed as a binary, comes to 54 65 73 74 0a 4c 69 6e 65 into the registry key.

The software\wendy folder contains things i use as a third set of shell-folders too.

1580557777151.png
 
@w_krieger, which registry editor is that? I've never seen one that shows the key and lets you change the type in the edit dialog. Oh, but the string isn't stored as unicode...
 

Similar threads

Back
Top