Trying something different

This commit is contained in:
TheFlyingFool 2024-05-13 16:58:32 -05:00
parent 0662cacf4d
commit d272ac0c53

View File

@ -64,8 +64,9 @@ do {
Write-Host '9 - Exit' Write-Host '9 - Exit'
Write-Host '' Write-Host ''
$answer = Read-Host 'Select number(s)' $answer = Read-Host 'Select number(s)'
} until ($answer -in @(1..5; 9)) $ok =$answer -in @(1..5; 9)
} until ($ok)
if ($answer -eq 9) { break } if ($answer -eq 9) { break }
@ -73,8 +74,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' },
@{name = 'Microsoft.WindowsTerminal'}, @{name = 'Microsoft.WindowsTerminal'},
@ -97,7 +97,6 @@ do {
@{name = 'Microsoft.Office' }, @{name = 'Microsoft.Office' },
@{name = 'Malwarebytes.Malwarebytes '} @{name = 'Malwarebytes.Malwarebytes '}
) )
Foreach ($app in $apps) { Foreach ($app in $apps) {
$listApp = winget list --exact -q $app.name $listApp = winget list --exact -q $app.name
if (![String]::Join("", $listApp).Contains($app.name)) { if (![String]::Join("", $listApp).Contains($app.name)) {
@ -126,7 +125,24 @@ do {
@{name = 'GOG.Galaxy '}, @{name = 'GOG.Galaxy '},
@{name = 'Discord.Discord '} @{name = 'Discord.Discord '}
) )
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
} }
"3" { "3" {
$apps = @( ## DESKTOP $apps = @( ## DESKTOP
@ -135,15 +151,31 @@ do {
@{name = 'Asus.ArmouryCrate '}, @{name = 'Asus.ArmouryCrate '},
@{name = 'Nvidia.GeForceExperience '} @{name = 'Nvidia.GeForceExperience '}
) )
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
} }
"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!
) )
Foreach ($app in $apps) {
Foreach ($app in $apps) {
$listApp = winget list --exact -q $app.name $listApp = winget list --exact -q $app.name
if (![String]::Join("", $listApp).Contains($app.name)) { if (![String]::Join("", $listApp).Contains($app.name)) {
Write-host "Installing:" $app.name Write-host "Installing:" $app.name
@ -159,10 +191,11 @@ do {
else { else {
Write-host "Skipping Install of " $app.name Write-host "Skipping Install of " $app.name
} }
}
}
#InstallTheApps $Apps #InstallTheApps $Apps
}
}
'5' { '5' {
## REMOVE CRAP ## REMOVE CRAP
Write-Output 'Removing Apps' Write-Output 'Removing Apps'