Attempt at a menu for install
This commit is contained in:
parent
c61b371959
commit
806b8d141d
@ -1,3 +1,3 @@
|
|||||||
# Win_Setup
|
# Win_Setup
|
||||||
|
|
||||||
Little powershell script that installs most of the windows programs I use
|
Little PowerShell script that installs most of the windows programs I use
|
||||||
|
192
setup.ps1
192
setup.ps1
@ -39,6 +39,9 @@
|
|||||||
#}
|
#}
|
||||||
|
|
||||||
#Configure WinGet
|
#Configure WinGet
|
||||||
|
do {
|
||||||
|
do {
|
||||||
|
Clear-Host ## Clear screen?
|
||||||
Write-Output "Configuring winget"
|
Write-Output "Configuring winget"
|
||||||
|
|
||||||
#winget config path from: https://github.com/microsoft/winget-cli/blob/master/doc/Settings.md#file-location
|
#winget config path from: https://github.com/microsoft/winget-cli/blob/master/doc/Settings.md#file-location
|
||||||
@ -56,58 +59,147 @@ $settingsJson =
|
|||||||
"@;
|
"@;
|
||||||
$settingsJson | Out-File $settingsPath -Encoding utf8
|
$settingsJson | Out-File $settingsPath -Encoding utf8
|
||||||
|
|
||||||
#Install New apps
|
write-host "1 - Base Apps"
|
||||||
Write-Output "Installing Apps"
|
write-host "2 - Game Launchers"
|
||||||
$apps = @(
|
write-host "3 - Desktop only"
|
||||||
@{name = "Microsoft.PowerShell" },
|
write-host "4 - Lenovo Laptop only"
|
||||||
@{name = "Microsoft.VisualStudioCode" },
|
write-host "5 - Remove Crap"
|
||||||
# @{name = "9WZDNCRFJ4MV"; source = "msstore" }, # Lenovo Vantage from MS Store
|
|
||||||
@{name = "Microsoft.PowerToys" },
|
write-host "9 - Exit"
|
||||||
@{name = "Git.Git" },
|
|
||||||
@{name = "Google.Chrome" },
|
write-host ""
|
||||||
@{name = "Google.Drive"},
|
$answer = read-host "Select number(s)"
|
||||||
@{name = "Sinew.Enpass" },
|
|
||||||
@{name = "Valve.Steam" },
|
$ok = $answer -match '[123459]+$'
|
||||||
@{name = "Plex.Plex" },
|
if ( -not $ok) {write-host "Invalid selection"
|
||||||
@{name = "ElectronicArts.EADesktop" }, #failed hash check on first test
|
Start-Sleep 2
|
||||||
# @{name = "Intel.IntelDriverAndSupportAssistant"},
|
write-host ""
|
||||||
@{name = "EpicGames.EpicGamesLauncher" },
|
}
|
||||||
@{name = "VivaldiTechnologies.Vivaldi" },
|
} until ($ok)
|
||||||
@{name = "VideoLAN.VLC"},
|
|
||||||
@{name = "PointPlanck.FileBot"},
|
switch -Regex ( $answer ) {
|
||||||
@{name = "Oracle.VirtualBox"},
|
"1" { $apps = @( # BASE APPS
|
||||||
@{name = "NordVPN.NordVPN"},
|
@{name = "Microsoft.PowerShell" },
|
||||||
# @{name = "Hashicorp.Vagrant"},
|
@{name = "Microsoft.VisualStudioCode" },
|
||||||
@{name = "Microsoft.Office"}, #Failed hash check on first test
|
@{name = "Microsoft.PowerToys" },
|
||||||
@{name = "Facebook.Messenger"}
|
@{name = "Git.Git" },
|
||||||
# @{name = "SteelSeries.SteelSeriesEngine"}, ## Might want to link this to a second PS script?
|
@{name = "Google.Chrome" },
|
||||||
# @{name = "Corsair.iCUE.4"} ## Might want to link this to a second PS script?
|
@{name = "Google.Drive"},
|
||||||
);
|
@{name = "Hugo.Hugo.Extended"},
|
||||||
Foreach ($app in $apps) {
|
@{name = "Bitwarden.Bitwarden"},
|
||||||
$listApp = winget list --exact -q $app.name
|
@{name = "Plex.Plex" },
|
||||||
if (![String]::Join("", $listApp).Contains($app.name)) {
|
@{name = "VivaldiTechnologies.Vivaldi" },
|
||||||
Write-host "Installing:" $app.name
|
@{name = "VideoLAN.VLC"},
|
||||||
if ($app.source -ne $null) {
|
@{name = "PointPlanck.FileBot"},
|
||||||
winget install --exact $app.name --source $app.source
|
@{name = "Oracle.VirtualBox"},
|
||||||
# winget install --exact --silent $app.name --source $app.source
|
@{name = "NordVPN.NordVPN"},
|
||||||
}
|
@{name = "Facebook.Messenger"},
|
||||||
else {
|
@{name = "Microsoft.Office"}
|
||||||
winget install --exact $app.name
|
)
|
||||||
# winget install --exact --silent $app.name
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
Write-host "Skipping Install of " $app.name
|
"2" {
|
||||||
|
{ $apps = @( # Game Launchers
|
||||||
|
@{name = "ElectronicArts.EADesktop" },
|
||||||
|
@{name = "Valve.Steam" },
|
||||||
|
@{name = "EpicGames.EpicGamesLauncher" }
|
||||||
|
)
|
||||||
|
Foreach ($app in $apps) {
|
||||||
|
$listApp = winget list --exact -q $app.name
|
||||||
|
if (![String]::Join("", $listApp).Contains($app.name)) {
|
||||||
|
Write-host "Installing:" $app.name
|
||||||
|
if ($app.source -ne $null) {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
"3" {## DESKTOP
|
||||||
|
{ $apps = @(
|
||||||
|
@{name = "SteelSeries.SteelSeriesEngine"}, ## Might want to link this to a second PS script?
|
||||||
|
@{name = "Corsair.iCUE.4"} ## Might want to link this to a second PS script?
|
||||||
|
)
|
||||||
|
Foreach ($app in $apps) {
|
||||||
|
$listApp = winget list --exact -q $app.name
|
||||||
|
if (![String]::Join("", $listApp).Contains($app.name)) {
|
||||||
|
Write-host "Installing:" $app.name
|
||||||
|
if ($app.source -ne $null) {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
"4" {## LAPTOP
|
||||||
|
|
||||||
|
{ $apps = @(
|
||||||
|
@{name = "Intel.IntelDriverAndSupportAssistant"},
|
||||||
|
@{name = "9WZDNCRFJ4MV"; source = "msstore" } # Lenovo Vantage from MS Store
|
||||||
|
)
|
||||||
|
Foreach ($app in $apps) {
|
||||||
|
$listApp = winget list --exact -q $app.name
|
||||||
|
if (![String]::Join("", $listApp).Contains($app.name)) {
|
||||||
|
Write-host "Installing:" $app.name
|
||||||
|
if ($app.source -ne $null) {
|
||||||
|
winget install --exact $app.name --source $app.source
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
winget install --exact $app.name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-host "Skipping Install of " $app.name
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
"5" { ## REMOVE CRAP
|
||||||
#Remove Apps -- This section seems to need to run in an admin console!
|
Write-Output "Removing Apps"
|
||||||
Write-Output "Removing Apps"
|
$apps = "*3DPrint*", "Microsoft.MixedReality.Portal", "Disney.*" ,"Microsoft.BingNews*" ,"*BingWeather*","*.MicrosoftOfficeHub*" , "*MicrosoftSolitaireCollection*"
|
||||||
|
Foreach ($app in $apps)
|
||||||
$apps = "*3DPrint*", "Microsoft.MixedReality.Portal", "Disney.*" ,"Microsoft.BingNews*" ,"*BingWeather*",
|
{
|
||||||
"*.MicrosoftOfficeHub*" , "*MicrosoftSolitaireCollection*" , "Microsoft.OneDrive"
|
Write-host "Uninstalling:" $app
|
||||||
Foreach ($app in $apps)
|
Get-AppxPackage -allusers $app | Remove-AppxPackage
|
||||||
{
|
}
|
||||||
Write-host "Uninstalling:" $app
|
}
|
||||||
Get-AppxPackage -allusers $app | Remove-AppxPackage
|
|
||||||
}
|
}
|
||||||
|
} until ( $answer -match "9" )
|
||||||
|
Loading…
Reference in New Issue
Block a user