Replace non-existent 7z1900-x64.msi file with 7z2102-x64.msi URL
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
if not exist "C:\Windows\Temp\7z1900-x64.msi" (
|
||||
powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://www.7-zip.org/a/7z1900-x64.msi', 'C:\Windows\Temp\7z1900-x64.msi')" <NUL
|
||||
if not exist "C:\Windows\Temp\7z2102-x64.msi" (
|
||||
powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://www.7-zip.org/a/7z2102-x64.msi', 'C:\Windows\Temp\7z2102-x64.msi')" <NUL
|
||||
)
|
||||
msiexec /qb /i C:\Windows\Temp\7z1900-x64.msi
|
||||
msiexec /qb /i C:\Windows\Temp\7z2102-x64.msi
|
||||
|
||||
if not exist "C:\Windows\Temp\SDelete.zip" (
|
||||
powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://download.sysinternals.com/files/SDelete.zip', 'C:\Windows\Temp\SDelete.zip')" <NUL
|
||||
@@ -12,7 +12,7 @@ if not exist "C:\Windows\Temp\sdelete.exe" (
|
||||
cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\SDelete.zip -oC:\Windows\Temp"
|
||||
)
|
||||
|
||||
msiexec /qb /x C:\Windows\Temp\7z1900-x64.msi
|
||||
msiexec /qb /x C:\Windows\Temp\7z2102-x64.msi
|
||||
|
||||
net stop wuauserv 1> nul 2>&1
|
||||
rmdir /S /Q C:\Windows\SoftwareDistribution\Download
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
if not exist "C:\Windows\Temp\7z1900-x64.msi" (
|
||||
powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://www.7-zip.org/a/7z1900-x64.msi', 'C:\Windows\Temp\7z1900-x64.msi')" <NUL
|
||||
if not exist "C:\Windows\Temp\7z2102-x64.msi" (
|
||||
powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://www.7-zip.org/a/7z2102-x64.msi', 'C:\Windows\Temp\7z2102-x64.msi')" <NUL
|
||||
)
|
||||
if not exist "C:\Windows\Temp\7z1900-x64.msi" (
|
||||
powershell -Command "Start-Sleep 5; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://www.7-zip.org/a/7z1900-x64.msi', 'C:\Windows\Temp\7z1900-x64.msi')" <NUL
|
||||
if not exist "C:\Windows\Temp\7z2102-x64.msi" (
|
||||
powershell -Command "Start-Sleep 5; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://www.7-zip.org/a/7z2102-x64.msi', 'C:\Windows\Temp\7z2102-x64.msi')" <NUL
|
||||
)
|
||||
msiexec /qb /i C:\Windows\Temp\7z1900-x64.msi
|
||||
msiexec /qb /i C:\Windows\Temp\7z2102-x64.msi
|
||||
|
||||
if "%PACKER_BUILDER_TYPE%" equ "vmware-iso" goto :vmware
|
||||
if "%PACKER_BUILDER_TYPE%" equ "virtualbox-iso" goto :virtualbox
|
||||
@@ -48,4 +48,4 @@ rd /S /Q "C:\Windows\Temp\virtualbox"
|
||||
goto :done
|
||||
|
||||
:done
|
||||
msiexec /qb /x C:\Windows\Temp\7z1900-x64.msi
|
||||
msiexec /qb /x C:\Windows\Temp\7z2102-x64.msi
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
if (!( Test-Path "C:\Windows\Temp\7z1900-x64.msi")) {
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://www.7-zip.org/a/7z1900-x64.msi', 'C:\Windows\Temp\7z1900-x64.msi')
|
||||
if (!( Test-Path "C:\Windows\Temp\7z2102-x64.msi")) {
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://www.7-zip.org/a/7z2102-x64.msi', 'C:\Windows\Temp\7z2102-x64.msi')
|
||||
}
|
||||
if (!(Test-Path "C:\Windows\Temp\7z1900-x64.msi")) {
|
||||
Start-Sleep 5; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://www.7-zip.org/a/7z1900-x64.msi', 'C:\Windows\Temp\7z1900-x64.msi')
|
||||
if (!(Test-Path "C:\Windows\Temp\7z2102-x64.msi")) {
|
||||
Start-Sleep 5; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://www.7-zip.org/a/7z2102-x64.msi', 'C:\Windows\Temp\7z2102-x64.msi')
|
||||
}
|
||||
cmd /c msiexec /qb /i C:\Windows\Temp\7z1900-x64.msi
|
||||
cmd /c msiexec /qb /i C:\Windows\Temp\7z2102-x64.msi
|
||||
|
||||
if ("$env:PACKER_BUILDER_TYPE" -eq "vmware-iso") {
|
||||
|
||||
@@ -85,4 +85,4 @@ if ("$env:PACKER_BUILDER_TYPE" -eq "virtualbox-iso") {
|
||||
cmd /c rd /S /Q "C:\Windows\Temp\virtualbox"
|
||||
}
|
||||
|
||||
cmd /c msiexec /qb /x C:\Windows\Temp\7z1900-x64.msi
|
||||
cmd /c msiexec /qb /x C:\Windows\Temp\7z2102-x64.msi
|
||||
|
||||
Reference in New Issue
Block a user