From b020563132b87b1d9d5f928870a28a0adc846287 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Mon, 1 May 2023 19:32:25 +0200 Subject: [PATCH] Update install-basic-apps.ps1 --- Data/basic-apps.csv | 62 +++++++++++++++++----------------- Scripts/install-basic-apps.ps1 | 21 ++++++------ 2 files changed, 42 insertions(+), 41 deletions(-) diff --git a/Data/basic-apps.csv b/Data/basic-apps.csv index 844de16c..6ea3a506 100644 --- a/Data/basic-apps.csv +++ b/Data/basic-apps.csv @@ -1,31 +1,31 @@ -APPLICATION, CATEGORY, APPID -"7-Zip", "file utility", "XPDNKVCX4QD2DC" -"Aquile Reader", "ebook reader", "9P08T4JLTQNK" -"CrystalDiskInfo", "HDD/SSD utility", "XP8K4RGX25G3GM" -"Dopamine", "audio player", "Digimezzo.Dopamine.2" -"Dropbox", "file sync", "Dropbox.Dropbox" -"Git for Windows", "code management", "Git.Git" -"Google Chrome", "desktop browser", "Google.Chrome" -"Greenshot", "screenshot utility", "9N8Z6RQX8LV8" -"inSSIDer", "Wifi tool", "MetaGeek.inSSIDer" -"IrfanView", "image viewer", "9PJZ3BTL5PV6" -"Kodi", "media center", "9NBLGGH4T892" -"LibreOffice", "office suite", "TheDocumentFoundation.LibreOffice" -"Microsoft Teams", "messenger", "XP8BT8DW290MPQ" -"Mozilla Firefox", "desktop browser", "9NZVDKPMR9RD" -"Mozilla Thunderbird", "email client", "Mozilla.Thunderbird" -"Mp3tag", "mp3 tag editor", "9NN77TCQ1NC8" -"Netflix", "video player", "9WZDNCRFJ3TJ" -"Notepad++", "text editor", "Notepad++.Notepad++" -"One Calendar", "desktop calendar", "9WZDNCRDR0SF" -"Pandoc", "file converter", "JohnMacFarlane.Pandoc" -"Rufus", "ISO image writer", "9PC3H3V7Q9CH" -"Signal", "messenger", "OpenWhisperSystems.Signal" -"smartmontools", "HDD/SSD utility", "smartmontools.smartmontools" -"Spotify", "music and podcasts", "9NCBCSZSJRSB" -"Typora", "Markdown editor", "Typora.Typora" -"Visual Studio Code", "code editor", "XP9KHM4BK9FZ7Q" -"VLC", "media player", "XPDM1ZW6815MQM" -"Windows Terminal", "terminal application", "9N0DX20HK701" -"WhatsApp", "messenger", "9NKSQGP7F2NH" -"Zoom", "video conferences", "Zoom.Zoom" +APPLICATION, CATEGORY, APPID +"7-Zip", "file utility", "XPDNKVCX4QD2DC" +"Aquile Reader", "ebook reader", "9P08T4JLTQNK" +"CrystalDiskInfo", "HDD/SSD utility", "XP8K4RGX25G3GM" +"Dopamine", "audio player", "Digimezzo.Dopamine.2" +"Dropbox", "file sync", "Dropbox.Dropbox" +"Git for Windows", "source code management","Git.Git" +"Google Chrome", "desktop browser", "Google.Chrome" +"Greenshot", "screenshot utility", "Greenshot.Greenshot" +"inSSIDer", "Wifi tool", "MetaGeek.inSSIDer" +"IrfanView", "image viewer", "9PJZ3BTL5PV6" +"Kodi", "media center", "9NBLGGH4T892" +"LibreOffice", "office suite", "TheDocumentFoundation.LibreOffice" +"Microsoft Teams", "messenger", "XP8BT8DW290MPQ" +"Mozilla Firefox", "desktop browser", "9NZVDKPMR9RD" +"Mozilla Thunderbird", "email client", "Mozilla.Thunderbird" +"Mp3tag", "MP3 tag editor", "9NN77TCQ1NC8" +"Netflix", "video player", "9WZDNCRFJ3TJ" +"Notepad++", "text editor", "Notepad++.Notepad++" +"One Calendar", "desktop calendar", "9WZDNCRDR0SF" +"Pandoc", "file converter", "JohnMacFarlane.Pandoc" +"Rufus", "ISO image writer", "9PC3H3V7Q9CH" +"Signal", "messenger", "OpenWhisperSystems.Signal" +"smartmontools", "HDD/SSD utility", "smartmontools.smartmontools" +"Spotify", "audio player", "9NCBCSZSJRSB" +"Typora", "Markdown editor", "Typora.Typora" +"Visual Studio Code", "code editor", "XP9KHM4BK9FZ7Q" +"VLC", "video player", "XPDM1ZW6815MQM" +"Windows Terminal", "console terminal", "9N0DX20HK701" +"WhatsApp", "messenger", "9NKSQGP7F2NH" +"Zoom", "video conferencing", "Zoom.Zoom" diff --git a/Scripts/install-basic-apps.ps1 b/Scripts/install-basic-apps.ps1 index db630f45..9eacc553 100755 --- a/Scripts/install-basic-apps.ps1 +++ b/Scripts/install-basic-apps.ps1 @@ -3,7 +3,7 @@ Installs basic apps .DESCRIPTION This PowerShell script installs basic Windows apps such as browser, e-mail client, etc. - Apps from the Microsoft Store are preferred (due to security and automatic updates). + Apps from Microsoft Store are preferred (due to security and automatic updates). .EXAMPLE PS> ./install-basic-apps .LINK @@ -15,33 +15,34 @@ try { $StopWatch = [system.diagnostics.stopwatch]::startNew() - "⏳ (1/30) Loading Data/basic-apps.csv..." + Write-Host "⏳ (1/32) Loading Data/basic-apps.csv... " -noNewline $Table = Import-CSV "$PSScriptRoot/../Data/basic-apps.csv" $NumEntries = $Table.count - Write-Host " The following $NumEntries basic apps will be installed or upgraded: " -NoNewline + Write-Host "$NumEntries entries" + Write-Host "⏳ (2/32) About to install or upgrade: " -noNewline foreach($Row in $Table) { [string]$AppName = $Row.APPLICATION Write-Host "$AppName, " -NoNewline } "" - "Press to abort, otherwise the installation will start in 10 seconds..." - Start-Sleep -seconds 10 + "Press to abort, otherwise the installation will start in 15 seconds..." + Start-Sleep -seconds 15 - [int]$Step = 2 + [int]$Step = 3 [int]$Failed = 0 foreach($Row in $Table) { [string]$AppName = $Row.APPLICATION [string]$Category = $Row.CATEGORY [string]$AppID = $Row.APPID - - "⏳ ($Step/$($NumEntries + 1)) Installing $AppName ($Category)..." + Write-Host " " + Write-Host "⏳ ($Step/$($NumEntries + 2)) Installing $Category '$AppName'..." & winget install --id $AppID --accept-package-agreements --accept-source-agreements - if ($lastExitCode -ne "0") { Write-Warning "'winget install' for $AppName failed"; $Failed++ } + if ($lastExitCode -ne "0") { $Failed++ } $Step++ } [int]$Installed = ($NumEntries - $Failed) [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds - "✔️ installed $Installed of $NumEntries basic apps in $Elapsed sec" + "✔️ installed $Installed of $NumEntries basic applications in $Elapsed sec" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"