From 4abee2a2acdf693ad87fe6686e78e5b017ef8677 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Fri, 9 May 2025 17:46:13 +0200 Subject: [PATCH] Updated install-vlc.ps1 --- scripts/install-vlc.ps1 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/install-vlc.ps1 b/scripts/install-vlc.ps1 index caccb640..493de6eb 100755 --- a/scripts/install-vlc.ps1 +++ b/scripts/install-vlc.ps1 @@ -5,8 +5,8 @@ This PowerShell script installs the VLC media player. .EXAMPLE PS> ./install-vlc.ps1 - ⏳ Installing VLC media player... - ✅ Installation of VLC media player took 25 sec + ⏳ Installing VLC media player from Winget... + ✅ VLC media player installed successfully in 25s. .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -14,16 +14,16 @@ #> try { - "⏳ Installing VLC media player..." - $StopWatch = [system.diagnostics.stopwatch]::startNew() + "⏳ Installing VLC media player from WinGet..." + $stopWatch = [system.diagnostics.stopwatch]::startNew() - & winget install --id XPDM1ZW6815MQM --accept-package-agreements --accept-source-agreements + & winget install --id VideoLAN.VLC --accept-package-agreements --accept-source-agreements if ($lastExitCode -ne 0) { throw "Can't install VLC media player, is it already installed?" } - [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds - "✅ Installation of VLC media player took $Elapsed sec" + [int]$elapsed = $stopWatch.Elapsed.TotalSeconds + "✅ VLC media player installed successfully in $($elapsed)s." exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ Error: $($Error[0])" exit 1 }