Skip to content

Commit

Permalink
Fixed registry issue with 64 bit unlocker
Browse files Browse the repository at this point in the history
  • Loading branch information
acidicoala committed Mar 26, 2021
1 parent d4b3412 commit f49c02b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Common/src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,14 +220,14 @@ char* makeCStringCopy(string src)

string getReg(string key, string valueName)
{
winreg::RegKey regKey{ HKEY_LOCAL_MACHINE, stow(key).c_str(), KEY_READ };
winreg::RegKey regKey{ HKEY_LOCAL_MACHINE, stow(key).c_str(), KEY_WOW64_32KEY | KEY_READ };
return wtos(regKey.GetStringValue(stow(valueName)));
}

// Should be called only from InstallationWizard, since writing to HKLM requires admin rights.
void setReg(string key, string valueName, string data)
{
winreg::RegKey regKey{ HKEY_LOCAL_MACHINE, stow(key).c_str(), KEY_ALL_ACCESS };
winreg::RegKey regKey{ HKEY_LOCAL_MACHINE, stow(key).c_str(), KEY_WOW64_32KEY | KEY_ALL_ACCESS };
regKey.SetStringValue(stow(valueName), stow(data));
}

Expand Down

0 comments on commit f49c02b

Please sign in to comment.