From 2cf9e795f201d35fde619aabde522ce3971726f0 Mon Sep 17 00:00:00 2001 From: TheFlyingFool Date: Mon, 13 May 2024 16:35:20 -0500 Subject: [PATCH] Trying old method --- setup.ps1 | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/setup.ps1 b/setup.ps1 index 5197aaf..2e6e548 100644 --- a/setup.ps1 +++ b/setup.ps1 @@ -125,8 +125,26 @@ do { @{name = 'j5create.Driver-JUA365' } ## Not sure if this is correct yet! ) - InstallTheApps $Apps - } + Foreach ($app in $apps) { + $listApp = winget list --exact -q $app.name + if (![String]::Join("", $listApp).Contains($app.name)) { + Write-host "Installing:" $app.name + if ($null -ne $app.source) { + winget install --exact $app.name --source $app.source + # winget install --exact --silent $app.name --source $app.source + } + else { + winget install --exact $app.name + # winget install --exact --silent $app.name + } + } + else { + Write-host "Skipping Install of " $app.name + } + } + } + #InstallTheApps $Apps + '5' { ## REMOVE CRAP Write-Output 'Removing Apps'