Update install-basic-apps.ps1

This commit is contained in:
Markus Fleschutz 2023-08-04 12:15:05 +02:00
parent 199b0f3162
commit e2a3efa833
2 changed files with 5 additions and 5 deletions

View File

@ -23,7 +23,7 @@ APPLICATION, CATEGORY, APPID
"Notepad++", "text editor", "Notepad++.Notepad++" "Notepad++", "text editor", "Notepad++.Notepad++"
"OBS Studio", "video recorder", "XPFFH613W8V6LV" "OBS Studio", "video recorder", "XPFFH613W8V6LV"
"One Calendar", "desktop calendar", "9WZDNCRDR0SF" "One Calendar", "desktop calendar", "9WZDNCRDR0SF"
"Pandoc", "file converter", "JohnMacFarlane.Pandoc" "Pandoc", "document converter", "JohnMacFarlane.Pandoc"
"Rufus", "ISO image writer", "9PC3H3V7Q9CH" "Rufus", "ISO image writer", "9PC3H3V7Q9CH"
"Signal", "messenger", "OpenWhisperSystems.Signal" "Signal", "messenger", "OpenWhisperSystems.Signal"
"smartmontools", "HDD/SSD utility", "smartmontools.smartmontools" "smartmontools", "HDD/SSD utility", "smartmontools.smartmontools"

1 APPLICATION CATEGORY APPID
23 Notepad++ text editor Notepad++.Notepad++
24 OBS Studio video recorder XPFFH613W8V6LV
25 One Calendar desktop calendar 9WZDNCRDR0SF
26 Pandoc file converter document converter JohnMacFarlane.Pandoc
27 Rufus ISO image writer 9PC3H3V7Q9CH
28 Signal messenger OpenWhisperSystems.Signal
29 smartmontools HDD/SSD utility smartmontools.smartmontools

View File

@ -32,7 +32,7 @@ try {
Start-Sleep -seconds 15 Start-Sleep -seconds 15
[int]$Step = 3 [int]$Step = 3
[int]$Failed = 0 [int]$Skipped = 0
foreach($Row in $Table) { foreach($Row in $Table) {
[string]$AppName = $Row.APPLICATION [string]$AppName = $Row.APPLICATION
[string]$Category = $Row.CATEGORY [string]$Category = $Row.CATEGORY
@ -40,12 +40,12 @@ try {
Write-Host " " Write-Host " "
Write-Host "⏳ ($Step/$($NumEntries + 2)) Installing $Category '$AppName'..." Write-Host "⏳ ($Step/$($NumEntries + 2)) Installing $Category '$AppName'..."
& winget install --id $AppID --accept-package-agreements --accept-source-agreements & winget install --id $AppID --accept-package-agreements --accept-source-agreements
if ($lastExitCode -ne "0") { $Failed++ } if ($lastExitCode -ne "0") { $Skipped++ }
$Step++ $Step++
} }
[int]$Installed = ($NumEntries - $Failed) [int]$Installed = ($NumEntries - $Skipped)
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
"✔️ installed $Installed of $NumEntries basic apps in $Elapsed sec" "✔️ Installation of $Installed basic apps ($Skipped skipped) took $Elapsed sec"
exit 0 # success exit 0 # success
} catch { } catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"