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 ''
$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 }
@ -73,8 +74,7 @@ do {
switch ( $answer ) {
"1" {
$apps = @( # BASE APPS
"1" { $apps = @( # BASE APPS
@{name = 'Microsoft.PowerShell' },
@{name = 'Microsoft.VisualStudioCode' },
@{name = 'Microsoft.WindowsTerminal'},
@ -97,7 +97,6 @@ do {
@{name = 'Microsoft.Office' },
@{name = 'Malwarebytes.Malwarebytes '}
)
Foreach ($app in $apps) {
$listApp = winget list --exact -q $app.name
if (![String]::Join("", $listApp).Contains($app.name)) {
@ -126,7 +125,24 @@ do {
@{name = 'GOG.Galaxy '},
@{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" {
$apps = @( ## DESKTOP
@ -135,15 +151,31 @@ do {
@{name = 'Asus.ArmouryCrate '},
@{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
@{name = 'Intel.IntelDriverAndSupportAssistant' },
@{name = '9WZDNCRFJ4MV'; source = 'msstore' }, # Lenovo Vantage from MS Store
@{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
if (![String]::Join("", $listApp).Contains($app.name)) {
Write-host "Installing:" $app.name
@ -159,10 +191,11 @@ do {
else {
Write-host "Skipping Install of " $app.name
}
}
}
#InstallTheApps $Apps
}
}
'5' {
## REMOVE CRAP
Write-Output 'Removing Apps'