diff options
Diffstat (limited to 'chrome/app')
-rwxr-xr-x | chrome/app/google_update_client.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/app/google_update_client.cc b/chrome/app/google_update_client.cc index 019c401..bbe216f 100755 --- a/chrome/app/google_update_client.cc +++ b/chrome/app/google_update_client.cc @@ -81,8 +81,9 @@ bool GoogleUpdateClient::Launch(HINSTANCE instance, std::wstring key_path(google_update::kRegPathClientState); key_path.append(L"\\" + guid_); HKEY reg_key; - if (::RegOpenKeyEx(HKEY_CURRENT_USER, key_path.c_str(), 0, - KEY_WRITE, ®_key) == ERROR_SUCCESS) { + if (::RegCreateKeyEx(HKEY_CURRENT_USER, key_path.c_str(), 0, NULL, + REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, + ®_key, NULL) == ERROR_SUCCESS) { const wchar_t kVal[] = L"1"; ::RegSetValueEx(reg_key, google_update::kRegDidRunField, 0, REG_SZ, reinterpret_cast<const BYTE *>(kVal), sizeof(kVal)); |