diff options
author | finnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-17 20:54:30 +0000 |
---|---|---|
committer | finnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-17 20:54:30 +0000 |
commit | c00621d8ffcdc37041a95e659905207f132da5d8 (patch) | |
tree | f45668a42b9e6a2f2869e27ec15756d948bcda9e | |
parent | 348205b508a4b29a3dc4129d5bc0b9d733a40229 (diff) | |
download | chromium_src-c00621d8ffcdc37041a95e659905207f132da5d8.zip chromium_src-c00621d8ffcdc37041a95e659905207f132da5d8.tar.gz chromium_src-c00621d8ffcdc37041a95e659905207f132da5d8.tar.bz2 |
More fun with detecting UAC. Reports in the field indicate that some computers have EnableLUA set to 2, which Vista treats as UAC 'on' but since our check checks for uac == 1 we think UAC is 'off'.
Changed the check to look for != 0 instead.
Review URL: http://codereview.chromium.org/3110
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2330 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/win_util.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/base/win_util.cc b/base/win_util.cc index 38a4133..37c5075 100644 --- a/base/win_util.cc +++ b/base/win_util.cc @@ -328,7 +328,9 @@ bool UserAccountControlIsEnabled() { DWORD uac_enabled; if (!key.ReadValueDW(L"EnableLUA", &uac_enabled)) return true; - return (uac_enabled == 1); + // Users can set the EnableLUA value to something arbitrary, like 2, which + // Vista will treat as UAC enabled, so we make sure it is not set to 0. + return (uac_enabled != 0); } std::wstring FormatMessage(unsigned messageid) { |