1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2025-01-31 12:03:50 +01:00

Updates: Allow downgrades (#1051)

This commit is contained in:
Valentin Radu 2022-03-13 20:26:38 +02:00
parent 5f9681dc1d
commit 70f99c18fa
3 changed files with 7 additions and 1 deletions

View File

@ -562,6 +562,8 @@
"UpdatePolicy"=dword:00000001
;b Receive pre-release versions, if available (not recommended)
"UpdatePreferStaging"=dword:00000000
;b Suggest the latest version on the server, even if it's older (not recommended)
"UpdateAllowDowngrades"=dword:00000000
;t Update servers:
;w Releases
;Type a URL that serves resources adhering to GitHub's releases API. To learn how to configure your own update server, please consult the wiki.

View File

@ -492,6 +492,8 @@
"UpdatePolicy"=dword:00000001
;b Receive pre-release versions, if available (not recommended)
"UpdatePreferStaging"=dword:00000000
;b Suggest the latest version on the server, even if it's older (not recommended)
"UpdateAllowDowngrades"=dword:00000000
;t Update servers:
;w Releases
;Type a URL that serves resources adhering to GitHub's releases API. To learn how to configure your own update server, please consult the wiki.

View File

@ -287,7 +287,9 @@ BOOL IsUpdateAvailableHelper(
}
}
}
if (res == -1)
DWORD dwAllowDowngrades = FALSE, dwSize = sizeof(DWORD);
RegGetValueW(HKEY_CURRENT_USER, _T(REGPATH), L"UpdateAllowDowngrades", RRF_RT_DWORD, NULL, &dwAllowDowngrades, &dwSize);
if ((res == 1 && dwAllowDowngrades) || res == -1)
{
bIsUpdateAvailable = TRUE;
}