mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-02 12:24:11 +02:00
Update install-basic-apps.ps1
This commit is contained in:
parent
3d786d433d
commit
fac504c9f3
@ -32,4 +32,4 @@ APPLICATION, CATEGORY, APPID
|
|||||||
"VLC", "video player", "XPDM1ZW6815MQM"
|
"VLC", "video player", "XPDM1ZW6815MQM"
|
||||||
"Windows Terminal", "console terminal", "9N0DX20HK701"
|
"Windows Terminal", "console terminal", "9N0DX20HK701"
|
||||||
"WhatsApp", "messenger", "9NKSQGP7F2NH"
|
"WhatsApp", "messenger", "9NKSQGP7F2NH"
|
||||||
"Zoom", "video conferencing", "Zoom.Zoom"
|
"Zoom", "video conference software", "Zoom.Zoom"
|
||||||
|
|
@ -15,19 +15,18 @@
|
|||||||
try {
|
try {
|
||||||
$StopWatch = [system.diagnostics.stopwatch]::startNew()
|
$StopWatch = [system.diagnostics.stopwatch]::startNew()
|
||||||
|
|
||||||
Write-Host "⏳ (1/34) Loading Data/basic-apps.csv... " -noNewline
|
Write-Host "⏳ (1/36) 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
|
||||||
"$NumEntries apps"
|
"$NumEntries apps"
|
||||||
"⏳ (2/34) About to install or upgrade:"
|
Write-Host "⏳ (2/36) About to install/upgrade these apps: " -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 15 seconds..."
|
"Installation will start in 15 seconds... (otherwise press <Control> <C> to abort)"
|
||||||
Start-Sleep -seconds 15
|
Start-Sleep -seconds 15
|
||||||
|
|
||||||
[int]$Step = 3
|
[int]$Step = 3
|
||||||
@ -44,7 +43,7 @@ try {
|
|||||||
}
|
}
|
||||||
[int]$Installed = ($NumEntries - $Failed)
|
[int]$Installed = ($NumEntries - $Failed)
|
||||||
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
||||||
"✔️ installed $Installed of $NumEntries applications in $Elapsed sec"
|
"✔️ installed $Installed of $NumEntries basic apps in $Elapsed sec (use list-updates.ps1 later on to list available updates)"
|
||||||
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