Trying something diff, with only 1,5,9 reading

This commit is contained in:
TheFlyingFool 2024-05-13 16:47:14 -05:00
parent d47f0263a5
commit 0662cacf4d

View File

@ -65,7 +65,7 @@ do {
Write-Host '' Write-Host ''
$answer = Read-Host 'Select number(s)' $answer = Read-Host 'Select number(s)'
} until ($answer -in @(1.2.3.4.5; 9)) } until ($answer -in @(1..5; 9))
if ($answer -eq 9) { break } if ($answer -eq 9) { break }
@ -73,7 +73,7 @@ do {
switch ( $answer ) { switch ( $answer ) {
'1' { "1" {
$apps = @( # BASE APPS $apps = @( # BASE APPS
@{name = 'Microsoft.PowerShell' }, @{name = 'Microsoft.PowerShell' },
@{name = 'Microsoft.VisualStudioCode' }, @{name = 'Microsoft.VisualStudioCode' },
@ -97,9 +97,28 @@ do {
@{name = 'Microsoft.Office' }, @{name = 'Microsoft.Office' },
@{name = 'Malwarebytes.Malwarebytes '} @{name = 'Malwarebytes.Malwarebytes '}
) )
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
} }
'2' { "2" {
$apps = @( # Game Launchers $apps = @( # Game Launchers
@{name = 'ElectronicArts.EADesktop' }, @{name = 'ElectronicArts.EADesktop' },
@{name = 'Valve.Steam' }, @{name = 'Valve.Steam' },
@ -109,7 +128,7 @@ do {
) )
InstallTheApps $Apps InstallTheApps $Apps
} }
'3' { "3" {
$apps = @( ## DESKTOP $apps = @( ## DESKTOP
@{name = 'SteelSeries.SteelSeriesEngine' }, @{name = 'SteelSeries.SteelSeriesEngine' },
@{name = 'Corsair.iCUE.5' }, @{name = 'Corsair.iCUE.5' },
@ -118,7 +137,7 @@ do {
) )
InstallTheApps $Apps InstallTheApps $Apps
} }
'4' { $apps = @( ## LAPTOP "4" { $apps = @( ## LAPTOP
@{name = 'Intel.IntelDriverAndSupportAssistant' }, @{name = 'Intel.IntelDriverAndSupportAssistant' },
@{name = '9WZDNCRFJ4MV'; source = 'msstore' }, # Lenovo Vantage from MS Store @{name = '9WZDNCRFJ4MV'; source = 'msstore' }, # Lenovo Vantage from MS Store
@{name = 'j5create.Driver-JUA365' } ## Not sure if this is correct yet! @{name = 'j5create.Driver-JUA365' } ## Not sure if this is correct yet!