mirror of
https://github.com/LegacyUpdate/LegacyUpdate.git
synced 2025-01-22 06:01:50 -05:00
Don't clobber IsUserAnAdmin()
This commit is contained in:
parent
84c15556ad
commit
803ef07635
3 changed files with 3 additions and 3 deletions
|
@ -316,7 +316,7 @@ STDMETHODIMP CLegacyUpdateCtrl::RunWizard(IUpdateInstaller *installer, BSTR dial
|
|||
STDMETHODIMP CLegacyUpdateCtrl::GetUserType(UserType *retval) {
|
||||
DoIsPermittedCheck();
|
||||
|
||||
if (IsUserAnAdmin()) {
|
||||
if (IsUserAdmin()) {
|
||||
// Entire process is elevated.
|
||||
*retval = e_admin;
|
||||
} else if (m_elevatedHelper != NULL) {
|
||||
|
|
|
@ -51,7 +51,7 @@ void LaunchUpdateSite(int argc, LPWSTR *argv, int nCmdShow) {
|
|||
}
|
||||
|
||||
// If running on 2k/XP, make sure we're elevated. If not, show Run As prompt.
|
||||
if (!IsOSVersionOrLater(6, 0) && !IsUserAnAdmin()) {
|
||||
if (!IsOSVersionOrLater(6, 0) && !IsUserAdmin()) {
|
||||
LPWSTR filename;
|
||||
DWORD filenameSize;
|
||||
GetOwnFileName(&filename, &filenameSize);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include <windows.h>
|
||||
|
||||
static inline BOOL IsUserAnAdmin() {
|
||||
static inline BOOL IsUserAdmin() {
|
||||
SID_IDENTIFIER_AUTHORITY authority = SECURITY_NT_AUTHORITY;
|
||||
PSID adminsSid;
|
||||
BOOL result = FALSE;
|
||||
|
|
Loading…
Reference in a new issue