mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-29 03:13:55 +01:00
Update install-basic-apps.ps1
This commit is contained in:
parent
199b0f3162
commit
e2a3efa833
@ -23,7 +23,7 @@ APPLICATION, CATEGORY, APPID
|
||||
"Notepad++", "text editor", "Notepad++.Notepad++"
|
||||
"OBS Studio", "video recorder", "XPFFH613W8V6LV"
|
||||
"One Calendar", "desktop calendar", "9WZDNCRDR0SF"
|
||||
"Pandoc", "file converter", "JohnMacFarlane.Pandoc"
|
||||
"Pandoc", "document converter", "JohnMacFarlane.Pandoc"
|
||||
"Rufus", "ISO image writer", "9PC3H3V7Q9CH"
|
||||
"Signal", "messenger", "OpenWhisperSystems.Signal"
|
||||
"smartmontools", "HDD/SSD utility", "smartmontools.smartmontools"
|
||||
|
|
@ -32,7 +32,7 @@ try {
|
||||
Start-Sleep -seconds 15
|
||||
|
||||
[int]$Step = 3
|
||||
[int]$Failed = 0
|
||||
[int]$Skipped = 0
|
||||
foreach($Row in $Table) {
|
||||
[string]$AppName = $Row.APPLICATION
|
||||
[string]$Category = $Row.CATEGORY
|
||||
@ -40,12 +40,12 @@ try {
|
||||
Write-Host " "
|
||||
Write-Host "⏳ ($Step/$($NumEntries + 2)) Installing $Category '$AppName'..."
|
||||
& winget install --id $AppID --accept-package-agreements --accept-source-agreements
|
||||
if ($lastExitCode -ne "0") { $Failed++ }
|
||||
if ($lastExitCode -ne "0") { $Skipped++ }
|
||||
$Step++
|
||||
}
|
||||
[int]$Installed = ($NumEntries - $Failed)
|
||||
[int]$Installed = ($NumEntries - $Skipped)
|
||||
[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
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Loading…
Reference in New Issue
Block a user