From 90d57a1010bc5da52538b6bdd0bc79ea07327fdf Mon Sep 17 00:00:00 2001
From: icommonsCRC <icommonscrc@drexel.edu>
Date: Sun, 19 Jan 2025 21:17:29 +0000
Subject: [PATCH] Update wingetInstaller.ps1

---
 wingetInstaller.ps1 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/wingetInstaller.ps1 b/wingetInstaller.ps1
index 50cac67..67f5fbe 100644
--- a/wingetInstaller.ps1
+++ b/wingetInstaller.ps1
@@ -1,4 +1,4 @@
-# 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) {
-- 
GitLab