mirror of
https://github.com/msvc-win/get.msvc.win.git
synced 2025-12-16 05:07:39 +00:00
Compare commits
2 commits
8b62b8fa92
...
7117d24dc0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7117d24dc0 | ||
|
|
808cab258d |
4 changed files with 39 additions and 18 deletions
BIN
$OEM$.zip
BIN
$OEM$.zip
Binary file not shown.
11
32
11
32
|
|
@ -7,6 +7,7 @@ function Main {
|
|||
}
|
||||
|
||||
$procArch = $Env:PROCESSOR_ARCHITECTURE
|
||||
[int]$buildVersion = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion').CurrentBuild
|
||||
if ($procArch -eq 'ARM') {
|
||||
Write-Warning "This script does not support Windows RT. Exiting..."
|
||||
return 1
|
||||
|
|
@ -93,10 +94,16 @@ function Main {
|
|||
@{ Name = "vcredist_2008_x86.exe"; Url = "https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x86.exe"; Year = "2008" },
|
||||
@{ Name = "vcredist_2010_x86.exe"; Url = "https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x86.exe"; Year = "2010" },
|
||||
@{ Name = "vcredist_2012_x86.exe"; Url = "https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe"; Year = "2012" },
|
||||
@{ Name = "vcredist_2013_x86.exe"; Url = "https://aka.ms/highdpimfc2013x86enu"; Year = "2013" },
|
||||
@{ Name = "vcredist_v14_x86.exe"; Url = "https://aka.ms/vc14/vc_redist.x86.exe"; Year = "v14" }
|
||||
@{ Name = "vcredist_2013_x86.exe"; Url = "https://aka.ms/highdpimfc2013x86enu"; Year = "2013" }
|
||||
)
|
||||
|
||||
if ($buildVersion -ge 10240) {
|
||||
$downloads += @{ Name = "vcredist_v14_x86.exe"; Url = "https://aka.ms/vc14/vc_redist.x86.exe"; Year = "v14" }
|
||||
} else {
|
||||
Write-Host "Older Windows detected. Visual C++ 2015-2022 Redistributable Runtime will be installed instead. "
|
||||
$downloads += @{ Name = "vcredist_2015-2022_x86.exe"; Url = "https://aka.ms/vs/17/release/vc_redist.x86.exe"; Year = "2015-2022" }
|
||||
}
|
||||
|
||||
$ariaListPath = Join-Path $tempDir "fileList.txt"
|
||||
|
||||
# --- Download everything up front ---
|
||||
|
|
|
|||
19
64
19
64
|
|
@ -7,12 +7,12 @@ function Main {
|
|||
}
|
||||
|
||||
$procArch = $Env:PROCESSOR_ARCHITECTURE
|
||||
$buildVersion = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion').CurrentBuild
|
||||
[int]$buildVersion = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion').CurrentBuild
|
||||
if ($procArch -eq 'x86') {
|
||||
Write-Warning "This script does not support 32-bit Windows. Exiting..."
|
||||
return 1
|
||||
}
|
||||
elseif ($procArch -eq 'ARM64' -and $buildVersion -lt 22000) {
|
||||
elseif ($procArch -eq 'ARM64' -and $buildVersion -lt 21390) {
|
||||
Write-Warning "X64 emulation is not supported in this version of ARM64 Windows. Only x86 and ARM64 Runtime will be installed."
|
||||
}
|
||||
elseif ($procArch -eq 'ARM') {
|
||||
|
|
@ -106,12 +106,19 @@ function Main {
|
|||
@{ Name = "vcredist_2012_x86.exe"; Url = "https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe"; Year = "2012" },
|
||||
@{ Name = "vcredist_2012_x64.exe"; Url = "https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe"; Year = "2012" },
|
||||
@{ Name = "vcredist_2013_x86.exe"; Url = "https://aka.ms/highdpimfc2013x86enu"; Year = "2013" },
|
||||
@{ Name = "vcredist_2013_x64.exe"; Url = "https://aka.ms/highdpimfc2013x64enu"; Year = "2013" },
|
||||
@{ Name = "vcredist_v14_x86.exe"; Url = "https://aka.ms/vc14/vc_redist.x86.exe"; Year = "v14" },
|
||||
@{ Name = "vcredist_v14_x64.exe"; Url = "https://aka.ms/vc14/vc_redist.x64.exe"; Year = "v14" }
|
||||
@{ Name = "vcredist_2013_x64.exe"; Url = "https://aka.ms/highdpimfc2013x64enu"; Year = "2013" }
|
||||
)
|
||||
|
||||
if ($procArch -eq "ARM64" -and $buildVersion -lt 22000) {
|
||||
if ($buildVersion -ge 10240) {
|
||||
$downloads += @{ Name = "vcredist_v14_x86.exe"; Url = "https://aka.ms/vc14/vc_redist.x86.exe"; Year = "v14" }
|
||||
$downloads += @{ Name = "vcredist_v14_x64.exe"; Url = "https://aka.ms/vc14/vc_redist.x64.exe"; Year = "v14" }
|
||||
} else {
|
||||
Write-Host "Older Windows detected. Visual C++ 2015-2022 Redistributable Runtime will be installed instead. "
|
||||
$downloads += @{ Name = "vcredist_2015-2022_x86.exe"; Url = "https://aka.ms/vs/17/release/vc_redist.x86.exe"; Year = "2015-2022" }
|
||||
$downloads += @{ Name = "vcredist_2015-2022_x64.exe"; Url = "https://aka.ms/vs/17/release/vc_redist.x64.exe"; Year = "2015-2022" }
|
||||
}
|
||||
|
||||
if ($procArch -eq "ARM64" -and $buildVersion -lt 21390) {
|
||||
$downloads += @{ Name = "vcredist_v14_arm64.exe"; Url = "https://aka.ms/vc14/vc_redist.arm64.exe"; Year = "v14" }
|
||||
}
|
||||
|
||||
|
|
|
|||
27
index.html
27
index.html
|
|
@ -11,7 +11,7 @@ function Main {
|
|||
|
||||
$procArch = $Env:PROCESSOR_ARCHITECTURE
|
||||
$isServer = (Get-CimInstance Win32_OperatingSystem).ProductType -ne 1
|
||||
$buildVersion = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion').CurrentBuild
|
||||
[int]$buildVersion = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion').CurrentBuild
|
||||
if ($procArch -eq 'ARM') {
|
||||
Write-Warning "This script does not support Windows RT. Exiting..."
|
||||
return 1
|
||||
|
|
@ -126,19 +126,26 @@ function Main {
|
|||
@{ Name = "vcredist_2012_x86.exe"; Url = "https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe"; Year = "2012" },
|
||||
@{ Name = "vcredist_2012_x64.exe"; Url = "https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe"; Year = "2012" },
|
||||
@{ Name = "vcredist_2013_x86.exe"; Url = "https://aka.ms/highdpimfc2013x86enu"; Year = "2013" },
|
||||
@{ Name = "vcredist_2013_x64.exe"; Url = "https://aka.ms/highdpimfc2013x64enu"; Year = "2013" },
|
||||
@{ Name = "vcredist_v14_x86.exe"; Url = "https://aka.ms/vc14/vc_redist.x86.exe"; Year = "v14" },
|
||||
@{ Name = "vcredist_v14_x64.exe"; Url = "https://aka.ms/vc14/vc_redist.x64.exe"; Year = "v14" }
|
||||
@{ Name = "vcredist_2013_x64.exe"; Url = "https://aka.ms/highdpimfc2013x64enu"; Year = "2013" }
|
||||
)
|
||||
|
||||
if ($buildVersion -ge 10240) {
|
||||
$downloads += @{ Name = "vcredist_v14_x86.exe"; Url = "https://aka.ms/vc14/vc_redist.x86.exe"; Year = "v14" }
|
||||
$downloads += @{ Name = "vcredist_v14_x64.exe"; Url = "https://aka.ms/vc14/vc_redist.x64.exe"; Year = "v14" }
|
||||
} else {
|
||||
Write-Host "Older Windows detected. Visual C++ 2015-2022 Redistributable Runtime will be installed instead. "
|
||||
$downloads += @{ Name = "vcredist_2015-2022_x86.exe"; Url = "https://aka.ms/vs/17/release/vc_redist.x86.exe"; Year = "2015-2022" }
|
||||
$downloads += @{ Name = "vcredist_2015-2022_x64.exe"; Url = "https://aka.ms/vs/17/release/vc_redist.x64.exe"; Year = "2015-2022" }
|
||||
}
|
||||
|
||||
if ($procArch -eq "ARM64" -and $buildVersion -lt 21390) {
|
||||
$downloads += @{ Name = "vcredist_v14_arm64.exe"; Url = "https://aka.ms/vc14/vc_redist.arm64.exe"; Year = "v14" }
|
||||
}
|
||||
|
||||
if ($dxInstallOption -eq "Y") {
|
||||
$downloads += @{ Name = "directx_redist.exe"; Url = "https://download.microsoft.com/download/8/4/a/84a35bf1-dafe-4ae8-82af-ad2ae20b6b14/directx_jun2010_redist.exe" }
|
||||
}
|
||||
|
||||
if ($procArch -eq "ARM64" -and $buildVersion -lt 22000) {
|
||||
$downloads += @{ Name = "vcredist_v14_arm64.exe"; Url = "https://aka.ms/vc14/vc_redist.arm64.exe"; Year = "v14" }
|
||||
}
|
||||
|
||||
if ($installNet35) {
|
||||
if ($buildVersion -ge 27965) {
|
||||
$downloads += @{ Name = "dotnet35setup_vnext.exe"; Url = "https://download.microsoft.com/download/3d2c2884-8241-44c2-ad5e-39c8a3fecf15/DotNet35Setup.exe" }
|
||||
|
|
@ -149,7 +156,7 @@ function Main {
|
|||
|
||||
# --- Download everything up front ---
|
||||
foreach ($item in $downloads) {
|
||||
if ($item.Name -Match "x64" -and $procArch -ne "AMD64" -and $buildVersion -lt 22000) {
|
||||
if ($item.Name -Match "x64" -and $procArch -ne "AMD64" -and $buildVersion -lt 21390) {
|
||||
continue
|
||||
}
|
||||
if ($item.Name -Match "directx" -and $isServer) {
|
||||
|
|
@ -224,7 +231,7 @@ function Main {
|
|||
|
||||
# --- Install VC++ Redistributables ---
|
||||
foreach ($item in $downloads | Where-Object { $_.Name -like "vcredist*" }) {
|
||||
if ($item.Name -Match "x64" -and $procArch -ne "AMD64" -and $buildVersion -lt 22000) {
|
||||
if ($item.Name -Match "x64" -and $procArch -ne "AMD64" -and $buildVersion -lt 21390) {
|
||||
continue
|
||||
}
|
||||
$exePath = Join-Path $tempDir $item.Name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue