This script will install the latest version of VLC (x64) in it's default path.
Not sure if "L=1033" is actually needed as default language will fall back to OS (Swedish in my case) but it does install and works.
Update 2025-03-21:
Click to reveal
Click to hide
Updated the script to always grab the latest release available.
Update 2025-03-21:
Click to reveal
Click to hide
Here we go:
$ProgressPreference = 'SilentlyContinue'
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$tp = "C:\TempPath"
mkdir $tp
$htmlContent = Invoke-WebRequest -Uri "https://download.videolan.org/pub/videolan/vlc/last/win64/"
$fileName = $htmlContent.Content | Select-String -Pattern "vlc-[\d.]+-win64\.exe" | ForEach-Object { $_.Matches.Value }
$installerUrl = "https://download.videolan.org/pub/videolan/vlc/last/win64/$fileName"
$installerPath = "$tp\$fileName"
Invoke-WebRequest -Uri $installerUrl -OutFile $installerPath
Start-Process -FilePath $installerPath -ArgumentList "/L=1033 /S /NCRC /quiet /norestart" -Wait
Start-Sleep -Seconds 10
del $installerPath