فهرست منبع

Not displaying Administrator shield icon on Upgrade button, when Administrator permissions are not needed for the upgrade

Source commit: 0369789e66f6bfcd736f66f2515b8fdfcc289a3c
Martin Prikryl 2 سال پیش
والد
کامیت
c83979cda8
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      source/windows/Setup.cpp

+ 2 - 1
source/windows/Setup.cpp

@@ -1431,6 +1431,7 @@ void __fastcall TUpdateDownloadThread::UpdateDownloaded()
   {
     Params += FORMAT(" /LOG=\"%s\"", (ApplicationLog->Path + L".setup"));
   }
+  // This condition is not necessary, it's here to reduce an impact of the change only
   if (!GetInstallationPath(HKEY_LOCAL_MACHINE).IsEmpty() &&
       !GetInstallationPath(HKEY_CURRENT_USER).IsEmpty())
   {
@@ -1735,7 +1736,7 @@ bool __fastcall CheckForUpdates(bool CachedResults)
   if (!Updates.Results.DownloadUrl.IsEmpty())
   {
     Aliases[3].OnSubmit = MakeMethod<TButtonSubmitEvent>(NULL, DownloadUpdate);
-    Aliases[3].ElevationRequired = true;
+    Aliases[3].ElevationRequired = DoIsInstalled(HKEY_LOCAL_MACHINE);
   }
 
   TMessageParams Params;