Testing AppList

This commit is contained in:
TheFlyingFool 2024-05-13 16:20:12 -05:00
parent 44a95062e2
commit 79f311a2e1

View File

@ -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!