From 79f311a2e11b4f5453483301d5fbd0db35a71287 Mon Sep 17 00:00:00 2001 From: TheFlyingFool Date: Mon, 13 May 2024 16:20:12 -0500 Subject: [PATCH] Testing AppList --- setup.ps1 | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/setup.ps1 b/setup.ps1 index aaf9f59..c825f55 100644 --- a/setup.ps1 +++ b/setup.ps1 @@ -26,6 +26,27 @@ $settingsJson = @{installBehavior = @{ } $settingsJson | ConvertTo-Json | Out-File $settingsPath -Encoding utf8 +function InstallTheApps([array]$AppList) { + 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 + } + } +} + + do { $answer = $null do { @@ -48,25 +69,7 @@ do { if ($answer -eq 9) { break } - function InstallTheApps([array]$AppList) { - 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 - } - } - } + switch ( $answer ) { @@ -116,7 +119,7 @@ do { InstallTheApps $Apps } '4' { - $apps = @( ## LAPTOP + $AppList = @( ## LAPTOP @{name = 'Intel.IntelDriverAndSupportAssistant' }, @{name = '9WZDNCRFJ4MV'; source = 'msstore' }, # Lenovo Vantage from MS Store @{name = 'j5create.Driver-JUA365' } ## Not sure if this is correct yet!