Commit cf3c4017 authored by Ludovic Fauvet's avatar Ludovic Fauvet

msi: remove older (nsis) version before install

If a pre-2.1 version is detected it will be uninstalled silently before
parent 398bac6b
......@@ -43,6 +43,9 @@
<MajorUpgrade Schedule="afterInstallInitialize" DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit."/>
<Property Id="NSISLOCATION">
<RegistrySearch Id="NSISLOCATION" Type="raw" Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\VLC media player" Name="UninstallString" />
<Icon Id="vlc.ico" SourceFile="$(var.SourceDir)/vlc.ico"/>
......@@ -326,10 +329,18 @@
<!-- <RemoveExistingProducts After="InstallValidate" /> -->
<Custom Action="ExecVLCNSISUninstall" Before="InstallValidate">NSISLOCATION AND NOT Installed</Custom>
<Custom Action="ExecVLCCacheGen" Before="InstallFinalize">REINSTALL OR NOT Installed</Custom>
<Custom Action="SetExecVLCCacheGen" Before="ExecVLCCacheGen">REINSTALL OR NOT Installed</Custom>
<!-- Uninstall an older version of VLC (using NSIS) -->
<CustomAction Id = "ExecVLCNSISUninstall"
ExeCommand = "[NSISLOCATION] /S"
Execute = "immediate"
Impersonate = "no"
Return = "check" />
<!-- Launch silently vlc-cache-gen.exe during install -->
<CustomAction Id = "SetExecVLCCacheGen"
Property = "ExecVLCCacheGen"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment