diff --git a/Core/Libraries/Source/WWVegas/WWDownload/registry.cpp b/Core/Libraries/Source/WWVegas/WWDownload/registry.cpp index 494e09ecb2..e37944c0f7 100644 --- a/Core/Libraries/Source/WWVegas/WWDownload/registry.cpp +++ b/Core/Libraries/Source/WWVegas/WWDownload/registry.cpp @@ -120,12 +120,12 @@ bool GetStringFromRegistry(std::string path, std::string key, std::string& val) #endif fullPath.append(path); - if (getStringFromRegistry(HKEY_LOCAL_MACHINE, fullPath.c_str(), key.c_str(), val)) + if (getStringFromRegistry(HKEY_CURRENT_USER, fullPath.c_str(), key.c_str(), val)) { return true; } - return getStringFromRegistry(HKEY_CURRENT_USER, fullPath.c_str(), key.c_str(), val); + return getStringFromRegistry(HKEY_LOCAL_MACHINE, fullPath.c_str(), key.c_str(), val); } bool GetUnsignedIntFromRegistry(std::string path, std::string key, unsigned int& val) @@ -137,12 +137,12 @@ bool GetUnsignedIntFromRegistry(std::string path, std::string key, unsigned int& #endif fullPath.append(path); - if (getUnsignedIntFromRegistry(HKEY_LOCAL_MACHINE, fullPath.c_str(), key.c_str(), val)) + if (getUnsignedIntFromRegistry(HKEY_CURRENT_USER, fullPath.c_str(), key.c_str(), val)) { return true; } - return getUnsignedIntFromRegistry(HKEY_CURRENT_USER, fullPath.c_str(), key.c_str(), val); + return getUnsignedIntFromRegistry(HKEY_LOCAL_MACHINE, fullPath.c_str(), key.c_str(), val); } bool SetStringInRegistry( std::string path, std::string key, std::string val) @@ -154,9 +154,6 @@ bool SetStringInRegistry( std::string path, std::string key, std::string val) #endif fullPath.append(path); - if (setStringInRegistry( HKEY_LOCAL_MACHINE, fullPath, key, val)) - return true; - return setStringInRegistry( HKEY_CURRENT_USER, fullPath, key, val ); } @@ -169,9 +166,6 @@ bool SetUnsignedIntInRegistry( std::string path, std::string key, unsigned int v #endif fullPath.append(path); - if (setUnsignedIntInRegistry( HKEY_LOCAL_MACHINE, fullPath, key, val)) - return true; - return setUnsignedIntInRegistry( HKEY_CURRENT_USER, fullPath, key, val ); } diff --git a/Generals/Code/GameEngine/Source/Common/System/registry.cpp b/Generals/Code/GameEngine/Source/Common/System/registry.cpp index df4ab5f2ef..cf35683ba1 100644 --- a/Generals/Code/GameEngine/Source/Common/System/registry.cpp +++ b/Generals/Code/GameEngine/Source/Common/System/registry.cpp @@ -121,12 +121,12 @@ Bool GetStringFromRegistry(AsciiString path, AsciiString key, AsciiString& val) fullPath.concat(path); DEBUG_LOG(("GetStringFromRegistry - looking in %s for key %s", fullPath.str(), key.str())); - if (getStringFromRegistry(HKEY_LOCAL_MACHINE, fullPath.str(), key.str(), val)) + if (getStringFromRegistry(HKEY_CURRENT_USER, fullPath.str(), key.str(), val)) { return TRUE; } - return getStringFromRegistry(HKEY_CURRENT_USER, fullPath.str(), key.str(), val); + return getStringFromRegistry(HKEY_LOCAL_MACHINE, fullPath.str(), key.str(), val); } Bool GetUnsignedIntFromRegistry(AsciiString path, AsciiString key, UnsignedInt& val) @@ -135,12 +135,12 @@ Bool GetUnsignedIntFromRegistry(AsciiString path, AsciiString key, UnsignedInt& fullPath.concat(path); DEBUG_LOG(("GetUnsignedIntFromRegistry - looking in %s for key %s", fullPath.str(), key.str())); - if (getUnsignedIntFromRegistry(HKEY_LOCAL_MACHINE, fullPath.str(), key.str(), val)) + if (getUnsignedIntFromRegistry(HKEY_CURRENT_USER, fullPath.str(), key.str(), val)) { return TRUE; } - return getUnsignedIntFromRegistry(HKEY_CURRENT_USER, fullPath.str(), key.str(), val); + return getUnsignedIntFromRegistry(HKEY_LOCAL_MACHINE, fullPath.str(), key.str(), val); } AsciiString GetRegistryLanguage(void) diff --git a/GeneralsMD/Code/GameEngine/Source/Common/System/registry.cpp b/GeneralsMD/Code/GameEngine/Source/Common/System/registry.cpp index 339423da85..86773aed81 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/System/registry.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/System/registry.cpp @@ -121,12 +121,12 @@ Bool GetStringFromGeneralsRegistry(AsciiString path, AsciiString key, AsciiStrin fullPath.concat(path); DEBUG_LOG(("GetStringFromRegistry - looking in %s for key %s", fullPath.str(), key.str())); - if (getStringFromRegistry(HKEY_LOCAL_MACHINE, fullPath.str(), key.str(), val)) + if (getStringFromRegistry(HKEY_CURRENT_USER, fullPath.str(), key.str(), val)) { return TRUE; } - return getStringFromRegistry(HKEY_CURRENT_USER, fullPath.str(), key.str(), val); + return getStringFromRegistry(HKEY_LOCAL_MACHINE, fullPath.str(), key.str(), val); } Bool GetStringFromRegistry(AsciiString path, AsciiString key, AsciiString& val) @@ -135,12 +135,12 @@ Bool GetStringFromRegistry(AsciiString path, AsciiString key, AsciiString& val) fullPath.concat(path); DEBUG_LOG(("GetStringFromRegistry - looking in %s for key %s", fullPath.str(), key.str())); - if (getStringFromRegistry(HKEY_LOCAL_MACHINE, fullPath.str(), key.str(), val)) + if (getStringFromRegistry(HKEY_CURRENT_USER, fullPath.str(), key.str(), val)) { return TRUE; } - return getStringFromRegistry(HKEY_CURRENT_USER, fullPath.str(), key.str(), val); + return getStringFromRegistry(HKEY_LOCAL_MACHINE, fullPath.str(), key.str(), val); } Bool GetUnsignedIntFromRegistry(AsciiString path, AsciiString key, UnsignedInt& val) @@ -149,12 +149,12 @@ Bool GetUnsignedIntFromRegistry(AsciiString path, AsciiString key, UnsignedInt& fullPath.concat(path); DEBUG_LOG(("GetUnsignedIntFromRegistry - looking in %s for key %s", fullPath.str(), key.str())); - if (getUnsignedIntFromRegistry(HKEY_LOCAL_MACHINE, fullPath.str(), key.str(), val)) + if (getUnsignedIntFromRegistry(HKEY_CURRENT_USER, fullPath.str(), key.str(), val)) { return TRUE; } - return getUnsignedIntFromRegistry(HKEY_CURRENT_USER, fullPath.str(), key.str(), val); + return getUnsignedIntFromRegistry(HKEY_LOCAL_MACHINE, fullPath.str(), key.str(), val); } AsciiString GetRegistryLanguage(void)