Update install-basic-apps.ps1

This commit is contained in:
Markus Fleschutz 2023-02-19 10:51:25 +01:00
parent 7d52b68568
commit a98528c96e
2 changed files with 8 additions and 8 deletions

View File

@ -1,4 +1,4 @@
APPNAME, CATEGORY, APPID APPLICATION, CATEGORY, APPID
"7-Zip", "file tool", "XPDNKVCX4QD2DC" "7-Zip", "file tool", "XPDNKVCX4QD2DC"
"Aquile Reader", "ebook reader", "9P08T4JLTQNK" "Aquile Reader", "ebook reader", "9P08T4JLTQNK"
"CrystalDiskInfo", "HDD/SSD tool", "XP8K4RGX25G3GM" "CrystalDiskInfo", "HDD/SSD tool", "XP8K4RGX25G3GM"

1 APPNAME APPLICATION CATEGORY APPID
2 7-Zip file tool XPDNKVCX4QD2DC
3 Aquile Reader ebook reader 9P08T4JLTQNK
4 CrystalDiskInfo HDD/SSD tool XP8K4RGX25G3GM

View File

@ -2,8 +2,8 @@
.SYNOPSIS .SYNOPSIS
Installs basic apps Installs basic apps
.DESCRIPTION .DESCRIPTION
This PowerShell script installs basic Windows apps (browser, e-mail client, etc). This PowerShell script installs basic Windows apps such as browser, e-mail client, etc.
Apps from the Microsoft Store are preferred for automatic updates. Apps from the Microsoft Store are preferred (due to security and automatic updates).
.EXAMPLE .EXAMPLE
PS> ./install-basic-apps PS> ./install-basic-apps
.LINK .LINK
@ -20,7 +20,7 @@ try {
$NumEntries = $Table.count $NumEntries = $Table.count
Write-Host " The following $NumEntries basic apps will be installed or upgraded: " -NoNewline Write-Host " The following $NumEntries basic apps will be installed or upgraded: " -NoNewline
foreach($Row in $Table) { foreach($Row in $Table) {
[string]$AppName = $Row.AppName [string]$AppName = $Row.APPLICATION
Write-Host "$AppName, " -NoNewline Write-Host "$AppName, " -NoNewline
} }
"" ""
@ -30,9 +30,9 @@ try {
[int]$Step = 2 [int]$Step = 2
[int]$Failed = 0 [int]$Failed = 0
foreach($Row in $Table) { foreach($Row in $Table) {
[string]$AppName = $Row.AppName [string]$AppName = $Row.APPLICATION
[string]$Category = $Row.Category [string]$Category = $Row.CATEGORY
[string]$AppID = $Row.AppID [string]$AppID = $Row.APPID
"⏳ ($Step/$($NumEntries + 1)) Installing $AppName ($Category)..." "⏳ ($Step/$($NumEntries + 1)) Installing $AppName ($Category)..."
& winget install --id $AppID --accept-package-agreements --accept-source-agreements & winget install --id $AppID --accept-package-agreements --accept-source-agreements
@ -46,4 +46,4 @@ try {
} catch { } catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1 exit 1
} }