From 0e097dbc1b1638d95c6f5b13482472e7233a5a1c Mon Sep 17 00:00:00 2001 From: "kuchhal@chromium.org" <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> Date: Wed, 5 Nov 2008 00:01:04 +0000 Subject: Always write 'dr' key to HKCU. Review URL: http://codereview.chromium.org/9291 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4710 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/app/google_update_client.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) mode change 100644 => 100755 chrome/app/google_update_client.cc (limited to 'chrome/app/google_update_client.cc') diff --git a/chrome/app/google_update_client.cc b/chrome/app/google_update_client.cc old mode 100644 new mode 100755 index 8ae8aee..046c560f --- a/chrome/app/google_update_client.cc +++ b/chrome/app/google_update_client.cc @@ -81,10 +81,9 @@ bool GoogleUpdateClient::Launch(HINSTANCE instance, ::GetProcAddress(dll_handle, entry_name)); if (NULL != entry) { // record did_run "dr" in client state - HKEY reg_root = (user_mode_) ? HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE; std::wstring key_path = google_update::kRegPathClientState + guid_; HKEY reg_key; - if (::RegOpenKeyEx(reg_root, key_path.c_str(), 0, + if (::RegOpenKeyEx(HKEY_CURRENT_USER, key_path.c_str(), 0, KEY_WRITE, ®_key) == ERROR_SUCCESS) { const wchar_t kVal[] = L"1"; ::RegSetValueEx(reg_key, google_update::kRegDidRunField, 0, REG_SZ, @@ -109,8 +108,6 @@ bool GoogleUpdateClient::Launch(HINSTANCE instance, bool GoogleUpdateClient::Init(const wchar_t* client_guid, const wchar_t* client_dll) { client_util::GetExecutablePath(dll_path_); - user_mode_ = InstallUtil::IsPerUserInstall(dll_path_); - guid_.assign(client_guid); dll_.assign(client_dll); bool ret = false; -- cgit v1.1