Fix compatible OS check

This commit is contained in:
Adam Demasi 2024-09-30 16:55:37 +09:30
parent 23d48e85e9
commit 2679ae3b39
No known key found for this signature in database
GPG key ID: 5D3B26B3D58C7D91

View file

@ -582,9 +582,12 @@ Function .onInit
${ElseIfNot} ${AtLeastWin10}
GetWinVer $0 Build
ReadRegDword $1 HKLM "System\CurrentControlSet\Control\Windows" "CSDVersion"
IntOp $2 $1 & 0xFF
IntOp $1 $1 & 0xFF
${If} $1 != 0
${OrIf} $0 != ${WINVER_BUILD_2000}
StrCpy $1 1
${EndIf}
${If} $0 != ${WINVER_BUILD_2000}
${AndIf} $0 != ${WINVER_BUILD_XP2002}
${AndIf} $0 != ${WINVER_BUILD_XP2003}
${AndIf} $0 != ${WINVER_BUILD_VISTA}
@ -595,6 +598,12 @@ Function .onInit
${AndIf} $0 != ${WINVER_BUILD_7_SP1}
${AndIf} $0 != ${WINVER_BUILD_8}
${AndIf} $0 != ${WINVER_BUILD_8.1}
${AndIf} $0 != ${WINVER_BUILD_10}
MessageBox MB_OK "Unsupported build $0"
StrCpy $1 1
${EndIf}
${If} $1 == 1
MessageBox MB_USERICON|MB_OKCANCEL \
"The current version of Windows is a beta build. Legacy Update may not work correctly on this version of Windows.$\r$\n\
$\r$\n\