Be extra careful again about not finding WUA

This commit is contained in:
Adam Demasi 2024-10-24 23:32:24 +10:30
parent 52c46cd21b
commit 93fdbe32f9
No known key found for this signature in database
GPG key ID: 5D3B26B3D58C7D91

View file

@ -1,21 +1,20 @@
Function DetermineWUAVersion
GetWinVer $1 Major
GetWinVer $2 Minor
GetWinVer $3 ServicePack
StrCpy $1 "$1.$2.$3"
; Hardcoded special case for XP Home/Embedded SP3, because the WUA 7.6.7600.256 setup SFX is
; seriously broken on it, potentially causing an unbootable Windows install due to it entering an
; infinite loop of creating folders in the root of C:.
${If} ${IsWinXP2002}
${AndIf} ${AtLeastServicePack} 3
${AndIf} ${IsHomeEdition}
${OrIf} ${IsEmbedded}
StrCpy $1 "5.1.3-home"
${Else}
GetWinVer $1 Major
GetWinVer $2 Minor
GetWinVer $3 ServicePack
StrCpy $1 "$1.$2.$3"
${If} $1 == "5.1.3"
${If} ${IsHomeEdition}
${OrIf} ${IsEmbedded}
StrCpy $1 "$1-home"
${EndIf}
${EndIf}
StrCpy $0 ""
ReadINIStr $2 $PLUGINSDIR\Patches.ini WUA $1
${If} $2 == ""
Return
@ -27,6 +26,10 @@ Function DetermineWUAVersion
Call GetArch
Pop $0
ReadINIStr $0 $PLUGINSDIR\Patches.ini WUA $2-$0
${If} $0 == ""
Return
${EndIf}
ReadINIStr $1 $PLUGINSDIR\Patches.ini WUA Prefix
StrCpy $0 "$1$0"
${EndIf}