mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-27 20:28:44 +02:00
Update install-basic-apps.ps1
This commit is contained in:
parent
031f6b4792
commit
b020563132
@ -1,31 +1,31 @@
|
|||||||
APPLICATION, CATEGORY, APPID
|
APPLICATION, CATEGORY, APPID
|
||||||
"7-Zip", "file utility", "XPDNKVCX4QD2DC"
|
"7-Zip", "file utility", "XPDNKVCX4QD2DC"
|
||||||
"Aquile Reader", "ebook reader", "9P08T4JLTQNK"
|
"Aquile Reader", "ebook reader", "9P08T4JLTQNK"
|
||||||
"CrystalDiskInfo", "HDD/SSD utility", "XP8K4RGX25G3GM"
|
"CrystalDiskInfo", "HDD/SSD utility", "XP8K4RGX25G3GM"
|
||||||
"Dopamine", "audio player", "Digimezzo.Dopamine.2"
|
"Dopamine", "audio player", "Digimezzo.Dopamine.2"
|
||||||
"Dropbox", "file sync", "Dropbox.Dropbox"
|
"Dropbox", "file sync", "Dropbox.Dropbox"
|
||||||
"Git for Windows", "code management", "Git.Git"
|
"Git for Windows", "source code management","Git.Git"
|
||||||
"Google Chrome", "desktop browser", "Google.Chrome"
|
"Google Chrome", "desktop browser", "Google.Chrome"
|
||||||
"Greenshot", "screenshot utility", "9N8Z6RQX8LV8"
|
"Greenshot", "screenshot utility", "Greenshot.Greenshot"
|
||||||
"inSSIDer", "Wifi tool", "MetaGeek.inSSIDer"
|
"inSSIDer", "Wifi tool", "MetaGeek.inSSIDer"
|
||||||
"IrfanView", "image viewer", "9PJZ3BTL5PV6"
|
"IrfanView", "image viewer", "9PJZ3BTL5PV6"
|
||||||
"Kodi", "media center", "9NBLGGH4T892"
|
"Kodi", "media center", "9NBLGGH4T892"
|
||||||
"LibreOffice", "office suite", "TheDocumentFoundation.LibreOffice"
|
"LibreOffice", "office suite", "TheDocumentFoundation.LibreOffice"
|
||||||
"Microsoft Teams", "messenger", "XP8BT8DW290MPQ"
|
"Microsoft Teams", "messenger", "XP8BT8DW290MPQ"
|
||||||
"Mozilla Firefox", "desktop browser", "9NZVDKPMR9RD"
|
"Mozilla Firefox", "desktop browser", "9NZVDKPMR9RD"
|
||||||
"Mozilla Thunderbird", "email client", "Mozilla.Thunderbird"
|
"Mozilla Thunderbird", "email client", "Mozilla.Thunderbird"
|
||||||
"Mp3tag", "mp3 tag editor", "9NN77TCQ1NC8"
|
"Mp3tag", "MP3 tag editor", "9NN77TCQ1NC8"
|
||||||
"Netflix", "video player", "9WZDNCRFJ3TJ"
|
"Netflix", "video player", "9WZDNCRFJ3TJ"
|
||||||
"Notepad++", "text editor", "Notepad++.Notepad++"
|
"Notepad++", "text editor", "Notepad++.Notepad++"
|
||||||
"One Calendar", "desktop calendar", "9WZDNCRDR0SF"
|
"One Calendar", "desktop calendar", "9WZDNCRDR0SF"
|
||||||
"Pandoc", "file converter", "JohnMacFarlane.Pandoc"
|
"Pandoc", "file 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"
|
||||||
"Spotify", "music and podcasts", "9NCBCSZSJRSB"
|
"Spotify", "audio player", "9NCBCSZSJRSB"
|
||||||
"Typora", "Markdown editor", "Typora.Typora"
|
"Typora", "Markdown editor", "Typora.Typora"
|
||||||
"Visual Studio Code", "code editor", "XP9KHM4BK9FZ7Q"
|
"Visual Studio Code", "code editor", "XP9KHM4BK9FZ7Q"
|
||||||
"VLC", "media player", "XPDM1ZW6815MQM"
|
"VLC", "video player", "XPDM1ZW6815MQM"
|
||||||
"Windows Terminal", "terminal application", "9N0DX20HK701"
|
"Windows Terminal", "console terminal", "9N0DX20HK701"
|
||||||
"WhatsApp", "messenger", "9NKSQGP7F2NH"
|
"WhatsApp", "messenger", "9NKSQGP7F2NH"
|
||||||
"Zoom", "video conferences", "Zoom.Zoom"
|
"Zoom", "video conferencing", "Zoom.Zoom"
|
||||||
|
|
@ -3,7 +3,7 @@
|
|||||||
Installs basic apps
|
Installs basic apps
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script installs basic Windows apps such as 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 (due to security and automatic updates).
|
Apps from Microsoft Store are preferred (due to security and automatic updates).
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./install-basic-apps
|
PS> ./install-basic-apps
|
||||||
.LINK
|
.LINK
|
||||||
@ -15,33 +15,34 @@
|
|||||||
try {
|
try {
|
||||||
$StopWatch = [system.diagnostics.stopwatch]::startNew()
|
$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"
|
$Table = Import-CSV "$PSScriptRoot/../Data/basic-apps.csv"
|
||||||
$NumEntries = $Table.count
|
$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) {
|
foreach($Row in $Table) {
|
||||||
[string]$AppName = $Row.APPLICATION
|
[string]$AppName = $Row.APPLICATION
|
||||||
Write-Host "$AppName, " -NoNewline
|
Write-Host "$AppName, " -NoNewline
|
||||||
}
|
}
|
||||||
""
|
""
|
||||||
"Press <Control> <C> to abort, otherwise the installation will start in 10 seconds..."
|
"Press <Control> <C> to abort, otherwise the installation will start in 15 seconds..."
|
||||||
Start-Sleep -seconds 10
|
Start-Sleep -seconds 15
|
||||||
|
|
||||||
[int]$Step = 2
|
[int]$Step = 3
|
||||||
[int]$Failed = 0
|
[int]$Failed = 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
|
||||||
[string]$AppID = $Row.APPID
|
[string]$AppID = $Row.APPID
|
||||||
|
Write-Host " "
|
||||||
"⏳ ($Step/$($NumEntries + 1)) Installing $AppName ($Category)..."
|
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") { Write-Warning "'winget install' for $AppName failed"; $Failed++ }
|
if ($lastExitCode -ne "0") { $Failed++ }
|
||||||
$Step++
|
$Step++
|
||||||
}
|
}
|
||||||
[int]$Installed = ($NumEntries - $Failed)
|
[int]$Installed = ($NumEntries - $Failed)
|
||||||
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
[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
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
Loading…
Reference in New Issue
Block a user