So I am trying to build a software and I want to write and read some data in registry. I write to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Organisation_Name\MyApp and read from this path as well. I made some changes. Changed the path "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Organisation_Name\MyApp" to "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OrganisationName\MyApp". For some reason I cannot read from that path. If I try to read the old path it works fine but the path does not exist in the registry. It reads from WOW6432Node ("HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Organisation_Name\MyApp"). Why is this happening? I compile it with MSVC2017 32bit.
I will explain further with images. I have this path in registry:
qDebug show me "myApp".
I alter the key on registry by deleting the "_" character on Organisation_Name like this:
qDebug shows nothing. My code works fine with the previous path but it takes it from here: