xsharp.eu • HKCU randomly uses Users registry entry - Page 2
Page 2 of 2

Re: HKCU randomly uses Users registry entry

Posted: Wed Feb 05, 2025 10:18 am
by ic2
Hello Wolfgang,
wriedmann wrote: Wed Feb 05, 2025 4:28 am you do need a default value to understand if the expected value is there.
If you pass in for example "$%&" as default value and the call returns that string, you can be sure that the value is not there.
I think you still misunderstand what I wrote.
In a sense I have a default value: an empty string. I read the registry value and get a non empty string - so using your recommendation I would conclude it worked. But I got that string (in seemingly random situations) from the users hive instead of HKCU. And this is a critically different (non empty) value than the one I asked for, from HKCU.

Dick