Registry oddity

May 20, 2008
11,520
102
Syracuse, NY, USA
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?
 
Jun 2, 2008
359
4
Try right clicking the value in Regedit and choosing Modify Binary Data to see exactly what's there.
 
May 20, 2008
11,520
102
Syracuse, NY, USA
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.
 
Jun 2, 2008
359
4
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.
 
May 20, 2008
11,520
102
Syracuse, NY, USA
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.
 
Jun 2, 2008
359
4
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
 
Nov 2, 2008
234
2
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
 
Jun 2, 2008
359
4
@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
Thread starter Title Forum Replies Date
Fross Deleting Registry DWord Value Support 2
M Another possibly strange remote registry issue Support 5
C "Failed to update the system registry. Please try using REGEDIT" Support 3
C Windows Registry Support 7
cgunhouse Registry Issues Support 8
S How to? Monitor shutdown event and write registry value Support 2
fpefpe How to? Volatile Registry Support 6
C OT: Registry OPEN verb to start elevated... Support 2
C Registry keys? (not JP specific) Support 0
C not sure of windows registry function use Support 2
C Take Command 11 registry keys not removed Support 1
fpefpe Registry as file system Support 20
P Version of TCMD that does not use the registry for keys, etc Support 5
C Re: Registry Entries Support 1
C Registry Entries Support 1
C Registry entries Support 0
Charles Dye Create empty registry value? Support 5
D Settings not writting to registry in XP (32 bit) Support 10
samintz WAD DO /s /a:d oddity Support 7
D v23 environment oddity Support 3
gentzel CompletePercents oddity Support 1
MickeyF @filewrite oddity (to me) Support 5
Fross Build 46 Oddity Support 5
M An oddity that's a little bit scary... Support 6
M Just a minor oddity... Support 9
M A real oddity but not a real problem... Support 8
Dan Glynhampton Documentation v15 help: Another mailto: link oddity Support 0
M And oddity re the 32-bit TCC on a 64-bit system... Support 4
M WAD An oddity with the "Dir" command... Support 2
D Environment variable oddity Support 12
M An oddity... Support 5
Charles Dye @ERRTEXT oddity Support 6
Charles Dye INPUT prompt oddity Support 5

Similar threads