Files
fleet/ee/maintained-apps/inputs/winget/scripts/microsoft_dotnet_runtime_install.ps1
Allen Houchins 10a47c882a Add Microsoft .NET Runtime 8 & 10 as Windows FMAs (#46877)
Add Winget input manifests for Microsoft .NET Runtime 8 and 10, plus a
shared install script and separate uninstall scripts for each major
version. Update outputs: register both runtimes in
ee/maintained-apps/outputs/apps.json and add per-app windows.json files
containing version metadata, installer URLs, sha256 checksums and script
refs. These changes enable automated install/uninstall and version
detection for .NET Runtime 8 and 10 in the maintained-apps catalog.
2026-06-05 00:22:48 -05:00

39 lines
1.0 KiB
PowerShell

# Learn more about .exe install scripts:
# http://fleetdm.com/learn-more-about/exe-install-scripts
#
# The .NET Runtime ships as a WiX "burn" bootstrapper (.exe). It installs
# machine-wide and registers its own ARP entry. Silent switches come from the
# winget installer manifest (Silent: /quiet, Custom: /norestart).
$exeFilePath = "${env:INSTALLER_PATH}"
try {
if (-not (Test-Path $exeFilePath)) {
Write-Host "Error: Installer file not found at: $exeFilePath"
Exit 1
}
$processOptions = @{
FilePath = "$exeFilePath"
ArgumentList = "/quiet /norestart"
PassThru = $true
Wait = $true
NoNewWindow = $true
}
$process = Start-Process @processOptions
$exitCode = $process.ExitCode
Write-Host "Install exit code: $exitCode"
# 0 = success, 3010 = success but reboot required, 1641 = reboot initiated
if ($exitCode -eq 3010 -or $exitCode -eq 1641) {
Exit 0
}
Exit $exitCode
} catch {
Write-Host "Error: $_"
Exit 1
}