Fixing VLC’s MSI Package

VLC don’t shout about it, but they have offered an MSI package to download for some time from their FTP site:

https://download.videolan.org/pub/videolan/vlc/

However the packages suffer from a strange bug where any attempt to modify the tables or apply an MST (to delete the desktop shortcut for example) corrupts the database and breaks the installer. It turns out this is because the developers are building the MSI package on Linux with WiX running under WINE, which is listed as incompatible on WINE’s AppDB. There is an open ticket for this here:

https://trac.videolan.org/vlc/ticket/18985

I tried exporting the database tables to a new MSI and repacking the cab files with InstEd Plus (if you deal with MSIs regularly you should buy it!. This fixed the problem, and so I have created a Powershell script to perform the same tasks.

This script leverages Deployment Tools Foundation (DTF), a very useful .NET wrapper around the Windows Installer API that comes from the WiX Toolset. It also shoehorns in WiMakCab.vbs from the now defunct Windows Installer SDK to perform the cab file operations (until I figure out how to do this natively with DTF!).

Simply put your VLC MSI packages you want to rebuild into the Input folder and run Rebuild-Msi.ps1. Then you will be able to modify the package to tweak shortcuts, automatic updates, privacy settings, file associations, etc without it breaking on you.

Download the script below:

VLC MSI Patcher v1.0

Categories:

Updated:

Comments