0
votes

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:

enter image description here

I have this code: enter image description here

qDebug show me "myApp".

I alter the key on registry by deleting the "_" character on Organisation_Name like this: enter image description here

Change my code: enter image description here

qDebug shows nothing. My code works fine with the previous path but it takes it from here: enter image description here

1

1 Answers

0
votes

Nevermind I found that it is a Windows thing. I have 64bit Windows and I was writing to registry manually but my app is 32bit so it searches to another place in registry. I tried to write and read via my app and it works fine.