In managed environments, ensuring all users have the latest stable software, while safely removing unwanted beta or test versions, is crucial. VLC Media Player’s frequent updates, combined with the occasional 4.0.x beta test that sneaks onto a machine, can create administrative headaches.
This powerful, single PowerShell script streamlines the process, automatically checking for and silently uninstalling the specified old 4.0.x beta versions before downloading and installing the latest stable VLC v3.0.21 EXE installer.
Key Features of the Script
The script is designed for enterprise readiness and includes robust features:
- Targeted Uninstallation: Searches the Windows Registry to identify and silently remove any unstable VLC versions matching the configurable
$TargetVersionPrefix(defaulting to4.0). - Latest Stable Version: Hardcoded to download the official, stable VLC v3.0.21 64-bit EXE installer.
- Silent Installation: Uses the
/Sswitch for a completely silent, non-interactive installation, perfect for deployment via RMM tools or startup scripts. - Proxy Awareness: Attempts to use system-detected proxy settings or allows for a manual proxy configuration via the
$ManualProxyUrivariable to ensure downloads succeed in restricted networks. - Clean Cleanup: Automatically deletes the downloaded EXE installer after successful installation.
The Deployment Script
Save the following code as vlc_deploy.ps1 and run it with administrator privileges.
How to Deploy
- Save the Script: Save the code block above as a file named
vlc_deploy.ps1. - Configuration Check (Proxy): If you encountered connectivity issues, edit the script and set the
$ManualProxyUrivariable to your required network proxy address (e.g.,$ManualProxyUri = "http://proxyserver:8080"). - Execution: Run the script using an elevated (Administrator) PowerShell prompt or through your deployment system:
This single file ensures your fleet is running the desired, stable version of VLC media player, every time.




