mirror of
https://github.com/msvc-win/get.msvc.win.git
synced 2025-12-16 13:17:26 +00:00
Update .NET 3.5 install procedure
This commit is contained in:
parent
20bfd17c1b
commit
2b379de41f
2 changed files with 17 additions and 12 deletions
18
index.html
18
index.html
|
|
@ -143,9 +143,6 @@ function Main {
|
||||||
if ($buildVersion -ge 27965) {
|
if ($buildVersion -ge 27965) {
|
||||||
$downloads += @{ Name = "dotnet35setup_vnext.exe"; Url = "https://download.microsoft.com/download/3d2c2884-8241-44c2-ad5e-39c8a3fecf15/DotNet35Setup.exe" }
|
$downloads += @{ Name = "dotnet35setup_vnext.exe"; Url = "https://download.microsoft.com/download/3d2c2884-8241-44c2-ad5e-39c8a3fecf15/DotNet35Setup.exe" }
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
$downloads += @{ Name = "dotnet35setup_legacy.exe"; Url = "https://download.visualstudio.microsoft.com/download/pr/b635098a-2d1d-4142-bef6-d237545123cb/2651b87007440a15209cac29634a4e45/dotnetfx35.exe" }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$ariaListPath = Join-Path $tempDir "fileList.txt"
|
$ariaListPath = Join-Path $tempDir "fileList.txt"
|
||||||
|
|
@ -239,6 +236,10 @@ function Main {
|
||||||
Start-Process -FilePath $exePath -ArgumentList $arguments -Wait
|
Start-Process -FilePath $exePath -ArgumentList $arguments -Wait
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# --- Install Visual Studio 2010 Tools for Office Runtime ---
|
||||||
|
Write-Host "Installing Visual Studio 2010 Tools for Office Runtime ..."
|
||||||
|
Start-Process -FilePath "$tempDir\vstor_redist.exe" -ArgumentList "/q /norestart" -Wait
|
||||||
|
|
||||||
# --- Install .NET Framework 3.5 ---
|
# --- Install .NET Framework 3.5 ---
|
||||||
if ($installNet35) {
|
if ($installNet35) {
|
||||||
Write-Host "Installing .NET Framework 3.5..."
|
Write-Host "Installing .NET Framework 3.5..."
|
||||||
|
|
@ -246,14 +247,15 @@ function Main {
|
||||||
Start-Process -FilePath "$tempDir\dotnet35setup_vnext.exe" -ArgumentList "/quiet /norestart" -Wait
|
Start-Process -FilePath "$tempDir\dotnet35setup_vnext.exe" -ArgumentList "/quiet /norestart" -Wait
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Start-Process -FilePath "$tempDir\dotnet35setup_legacy.exe" -ArgumentList "/q /norestart" -Wait
|
if ($isServer) {
|
||||||
|
Start-Process -FilePath "$env:SystemRoot\System32\Dism.exe" -ArgumentList "/online /enable-feature /featurename:netfx3 /all" -Wait
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Start-Process -FilePath "$env:SystemRoot\System32\Dism.exe" -ArgumentList "/online /enable-feature /featurename:netfx3" -Wait
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# --- Install Visual Studio 2010 Tools for Office Runtime ---
|
|
||||||
Write-Host "Installing Visual Studio 2010 Tools for Office Runtime ..."
|
|
||||||
Start-Process -FilePath "$tempDir\vstor_redist.exe" -ArgumentList "/q /norestart" -Wait
|
|
||||||
|
|
||||||
# --- Cleanup ---
|
# --- Cleanup ---
|
||||||
Write-Host "Cleaning up temporary files..."
|
Write-Host "Cleaning up temporary files..."
|
||||||
Start-Sleep -Seconds 2
|
Start-Sleep -Seconds 2
|
||||||
|
|
|
||||||
11
net35
11
net35
|
|
@ -7,6 +7,7 @@ function Main {
|
||||||
}
|
}
|
||||||
|
|
||||||
$procArch = $Env:PROCESSOR_ARCHITECTURE
|
$procArch = $Env:PROCESSOR_ARCHITECTURE
|
||||||
|
$isServer = (Get-CimInstance Win32_OperatingSystem).ProductType -ne 1
|
||||||
$buildVersion = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion').CurrentBuild
|
$buildVersion = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion').CurrentBuild
|
||||||
if ($procArch -eq 'ARM') {
|
if ($procArch -eq 'ARM') {
|
||||||
Write-Warning "This script does not support Windows RT. Exiting..."
|
Write-Warning "This script does not support Windows RT. Exiting..."
|
||||||
|
|
@ -96,9 +97,6 @@ function Main {
|
||||||
if ($buildVersion -ge 27965) {
|
if ($buildVersion -ge 27965) {
|
||||||
$downloads += @{ Name = "dotnet35setup_vnext.exe"; Url = "https://download.microsoft.com/download/3d2c2884-8241-44c2-ad5e-39c8a3fecf15/DotNet35Setup.exe"; Year = "dotnet35_vnext" }
|
$downloads += @{ Name = "dotnet35setup_vnext.exe"; Url = "https://download.microsoft.com/download/3d2c2884-8241-44c2-ad5e-39c8a3fecf15/DotNet35Setup.exe"; Year = "dotnet35_vnext" }
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
$downloads += @{ Name = "dotnet35setup_legacy.exe"; Url = "https://download.visualstudio.microsoft.com/download/pr/b635098a-2d1d-4142-bef6-d237545123cb/2651b87007440a15209cac29634a4e45/dotnetfx35.exe"; Year = "dotnet35_legacy" }
|
|
||||||
}
|
|
||||||
|
|
||||||
# --- Download everything up front ---
|
# --- Download everything up front ---
|
||||||
foreach ($item in $downloads) {
|
foreach ($item in $downloads) {
|
||||||
|
|
@ -163,7 +161,12 @@ function Main {
|
||||||
Start-Process -FilePath "$tempDir\dotnet35setup_vnext.exe" -ArgumentList "/quiet /norestart" -Wait
|
Start-Process -FilePath "$tempDir\dotnet35setup_vnext.exe" -ArgumentList "/quiet /norestart" -Wait
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Start-Process -FilePath "$tempDir\dotnet35setup_legacy.exe" -ArgumentList "/q /norestart" -Wait
|
if ($isServer) {
|
||||||
|
Start-Process -FilePath "$env:SystemRoot\System32\Dism.exe" -ArgumentList "/online /enable-feature /featurename:netfx3 /all" -Wait
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Start-Process -FilePath "$env:SystemRoot\System32\Dism.exe" -ArgumentList "/online /enable-feature /featurename:netfx3" -Wait
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# --- Cleanup ---
|
# --- Cleanup ---
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue