Intune Package Builder Initialization
This commit is contained in:
BIN
apps/dotNET/bin/windowsdesktop-runtime-8.0.12-win-x64.exe
Normal file
BIN
apps/dotNET/bin/windowsdesktop-runtime-8.0.12-win-x64.exe
Normal file
Binary file not shown.
24
apps/dotNET/install.ps1
Normal file
24
apps/dotNET/install.ps1
Normal file
@@ -0,0 +1,24 @@
|
||||
# array of uninstall args
|
||||
$uninstallArgs = "/uninstall"," ","/quiet"
|
||||
$dotnetVersions = Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -like "Microsoft .NET*" }
|
||||
|
||||
foreach ($version in $dotnetVersions) {
|
||||
# update array index 1 with version id
|
||||
$uninstallArgs[1] = "$($version.id)"
|
||||
Write-Host "Uninstalling $($version.Name)..."
|
||||
Start-Process -FilePath "msiexec.exe" -ArgumentList "$uninstallArgs" -Wait
|
||||
}
|
||||
|
||||
Write-Host "All Microsoft .NET versions uninstalled."
|
||||
|
||||
$uri = "https://download.visualstudio.microsoft.com/download/pr/f1e7ffc8-c278-4339-b460-517420724524/f36bb75b2e86a52338c4d3a90f8dac9b/windowsdesktop-runtime-8.0.12-win-x64.exe"
|
||||
$installerName =($uri -split "/")[-1]
|
||||
$installerPath = ('./bin/' + $installerName)
|
||||
if (-not (Test-Path -Path $installerPath)){
|
||||
Invoke-WebRequest -Uri $uri -OutFile $installerPath
|
||||
}
|
||||
|
||||
$installArgs = " /install"," /quiet"," /norestart"
|
||||
Start-Process -FilePath $installerPath -ArgumentList "$installArgs" -Wait
|
||||
|
||||
Write-Host ("Microsoft .NET versions installed: " + $installerName)
|
Reference in New Issue
Block a user