Skip to content
Snippets Groups Projects
Commit 90d57a10 authored by icommonsCRC's avatar icommonsCRC
Browse files

Update wingetInstaller.ps1

parent 984e2b8e
No related branches found
No related tags found
No related merge requests found
# Self-elevate the script if required
# Self-elevate the script if required
if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) {
if ([int](Get-CimInstance -Class Win32_OperatingSystem | Select-Object -ExpandProperty BuildNumber) -ge 6000) {
# PowerShell 5 and later
......@@ -98,7 +98,7 @@ foreach ($app in $applications) {
}
} else {
Write-Host "$app is not installed. Installing..." -ForegroundColor Green
winget install --id $app --silent --accept-package-agreements --accept-source-agreements
winget install --scope machine --id $app --silent --accept-package-agreements --accept-source-agreements
# Verify installation
if (Test-ApplicationInstalled -AppId $app) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment