mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 16:45:27 +00:00
Add 64bit binaries for KB2999226 to the x86 installer
Fix logic where it detects the Architecture of the system running the installer instead of the one building the installer Add a 3 seconds pause to actually see the error code if it throws one
This commit is contained in:
parent
0eb6ddf0e8
commit
a8f054b2d2
@ -138,25 +138,39 @@ If %Python%==2 goto get_vcredist
|
||||
:: For PY 3, include KB2999226
|
||||
@echo Copying KB2999226 to Prerequisites
|
||||
@echo ----------------------------------------------------------------------
|
||||
If Defined ProgramFiles(x86) (
|
||||
set Url60=http://repo.saltstack.com/windows/dependencies/64/ucrt/Windows6.0-KB2999226-x64.msu
|
||||
set Name60=Windows6.0-KB2999226-x64.msu
|
||||
set Url61=http://repo.saltstack.com/windows/dependencies/64/ucrt/Windows6.1-KB2999226-x64.msu
|
||||
set Name61=Windows6.1-KB2999226-x64.msu
|
||||
set Url80=http://repo.saltstack.com/windows/dependencies/64/ucrt/Windows8-RT-KB2999226-x64.msu
|
||||
set Name80=Windows8-RT-KB2999226-x64.msu
|
||||
set Url81=http://repo.saltstack.com/windows/dependencies/64/ucrt/Windows8.1-KB2999226-x64.msu
|
||||
set Name81=Windows8.1-KB2999226-x64.msu
|
||||
) Else (
|
||||
set Url60=http://repo.saltstack.com/windows/dependencies/32/ucrt/Windows6.0-KB2999226-x86.msu
|
||||
set Name60=Windows6.0-KB2999226-x86.msu
|
||||
set Url61=http://repo.saltstack.com/windows/dependencies/32/ucrt/Windows6.1-KB2999226-x86.msu
|
||||
set Name61=Windows6.1-KB2999226-x86.msu
|
||||
set Url80=http://repo.saltstack.com/windows/dependencies/32/ucrt/Windows8-RT-KB2999226-x86.msu
|
||||
set Name80=Windows8-RT-KB2999226-x86.msu
|
||||
set Url81=http://repo.saltstack.com/windows/dependencies/32/ucrt/Windows8.1-KB2999226-x86.msu
|
||||
set Name81=Windows8.1-KB2999226-x86.msu
|
||||
)
|
||||
:: 64 bit binaries required for AMD64 and x86
|
||||
:: Copy down the 64 bit binaries
|
||||
set Url60=http://repo.saltstack.com/windows/dependencies/64/ucrt/Windows6.0-KB2999226-x64.msu
|
||||
set Name60=Windows6.0-KB2999226-x64.msu
|
||||
set Url61=http://repo.saltstack.com/windows/dependencies/64/ucrt/Windows6.1-KB2999226-x64.msu
|
||||
set Name61=Windows6.1-KB2999226-x64.msu
|
||||
set Url80=http://repo.saltstack.com/windows/dependencies/64/ucrt/Windows8-RT-KB2999226-x64.msu
|
||||
set Name80=Windows8-RT-KB2999226-x64.msu
|
||||
set Url81=http://repo.saltstack.com/windows/dependencies/64/ucrt/Windows8.1-KB2999226-x64.msu
|
||||
set Name81=Windows8.1-KB2999226-x64.msu
|
||||
@echo - Downloading %Name60%
|
||||
powershell -ExecutionPolicy RemoteSigned -File download_url_file.ps1 -url %Url60% -file "%PreDir%\%Name60%"
|
||||
@echo - Downloading %Name61%
|
||||
powershell -ExecutionPolicy RemoteSigned -File download_url_file.ps1 -url %Url61% -file "%PreDir%\%Name61%"
|
||||
@echo - Downloading %Name80%
|
||||
powershell -ExecutionPolicy RemoteSigned -File download_url_file.ps1 -url %Url80% -file "%PreDir%\%Name80%"
|
||||
@echo - Downloading %Name81%
|
||||
powershell -ExecutionPolicy RemoteSigned -File download_url_file.ps1 -url %Url81% -file "%PreDir%\%Name81%"
|
||||
|
||||
:: 32 bit binaries only needed for x86 installer
|
||||
:: ProgramFiles(x86) is defined on AMD64 systems
|
||||
:: If it's defined, skip the x86 binaries
|
||||
If Defined ProgramFiles(x86) goto prereq_end
|
||||
|
||||
:: Copy down the 32 bit binaries
|
||||
set Url60=http://repo.saltstack.com/windows/dependencies/32/ucrt/Windows6.0-KB2999226-x86.msu
|
||||
set Name60=Windows6.0-KB2999226-x86.msu
|
||||
set Url61=http://repo.saltstack.com/windows/dependencies/32/ucrt/Windows6.1-KB2999226-x86.msu
|
||||
set Name61=Windows6.1-KB2999226-x86.msu
|
||||
set Url80=http://repo.saltstack.com/windows/dependencies/32/ucrt/Windows8-RT-KB2999226-x86.msu
|
||||
set Name80=Windows8-RT-KB2999226-x86.msu
|
||||
set Url81=http://repo.saltstack.com/windows/dependencies/32/ucrt/Windows8.1-KB2999226-x86.msu
|
||||
set Name81=Windows8.1-KB2999226-x86.msu
|
||||
@echo - Downloading %Name60%
|
||||
powershell -ExecutionPolicy RemoteSigned -File download_url_file.ps1 -url %Url60% -file "%PreDir%\%Name60%"
|
||||
@echo - Downloading %Name61%
|
||||
|
@ -244,15 +244,14 @@ Section -install_ucrt
|
||||
# Use WMI to check if it's installed
|
||||
detailPrint "Checking for existing KB2999226 installation"
|
||||
nsExec::ExecToStack 'cmd /q /c wmic qfe get hotfixid | findstr "^KB2999226"'
|
||||
Pop $0 # Gets the ErrorCode
|
||||
Pop $1 # Gets the stdout, which should be KB2999226 if it's installed
|
||||
${IfNot} $R0 == 0
|
||||
detailPrint "error: $R0"
|
||||
detailPrint "KB2999226 not found"
|
||||
${EndIf}
|
||||
# Clean up the stack
|
||||
Pop $R0 # Gets the ErrorCode
|
||||
Pop $R1 # Gets the stdout, which should be KB2999226 if it's installed
|
||||
|
||||
# If it returned KB2999226 it's already installed
|
||||
StrCmp $1 'KB2999226' lbl_done
|
||||
StrCmp $R1 'KB2999226' lbl_done
|
||||
|
||||
detailPrint "KB2999226 not found"
|
||||
|
||||
# All lower versions of Windows
|
||||
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" \
|
||||
@ -274,7 +273,10 @@ Section -install_ucrt
|
||||
${break}
|
||||
${EndSwitch}
|
||||
|
||||
${If} ${CPUARCH} == "AMD64"
|
||||
# Use RunningX64 here to get the Architecture for the system running the installer
|
||||
# CPUARCH is defined when the installer is built and is based on the machine that
|
||||
# built the installer, not the target system as we need here.
|
||||
${If} ${RunningX64}
|
||||
StrCpy $MsuFileName "$MsuPrefix-KB2999226-x64.msu"
|
||||
${Else}
|
||||
StrCpy $MsuFileName "$MsuPrefix-KB2999226-x86.msu"
|
||||
@ -284,11 +286,15 @@ Section -install_ucrt
|
||||
|
||||
detailPrint "Installing KB2999226 using file $MsuFileName"
|
||||
nsExec::ExecToStack 'cmd /c wusa "$PLUGINSDIR\$MsuFileName" /quiet /norestart'
|
||||
# Clean up the stack
|
||||
Pop $R0 # Get Error
|
||||
Pop $R1 # Get stdout
|
||||
${IfNot} $R0 == 0
|
||||
detailPrint "error: $R0"
|
||||
detailPrint "output: $R2"
|
||||
Sleep 3000
|
||||
${Else}
|
||||
detailPrint "KB2999226 installed successfully"
|
||||
${EndIf}
|
||||
|
||||
lbl_done:
|
||||
|
Loading…
Reference in New Issue
Block a user