0

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
This commit is contained in:
finnur@google.com
2008-09-17 20:54:30 +00:00
parent 348205b508
commit c00621d8ff

@ -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) {