11/27/2012 10663 views


I'm building my first msi. By default, on new installed computers, vlc 2.0.1 is installed. It has been done in the master with vlc-2.0.1 exe setup.

I have succesfully created vlc-2.0.4.msi, but the problem is that once installed I have both 2.0.1 and 2.0.4 in add/remove programs.

I'd like to find a solution : in the vlc-2.0.4.msi, uninstall 2.0.1 and then install 2.0.4, but I don't know how to proceed.

I thank you very much for your help.






0 Comments   [ + ] Show comments


All Answers


A simple way to uninstall the installed application would be :

-make a Custom Action =>CA

-place it before the installation of the files in your msi

-in the CA read the uninstall registry of your previouslly installed application: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\xyz\UninstallString

where "xyz" is the Key of the application you want to uninstall

Then read the value of "UninstallString", and run that value (preferablly from system account) using silent switches (a lot of applications have silent switches something like "/s" might work, test it for yourself)


It might be possible to make a SystemSearch for the registry value, place the value in a property and then just make a CA that runs an exe on the machine ( cmd.exe ) and pass to it the property and silent switches as parameters of the exe...

But i think the first option would make life easyer, as yo have more control in VBscript ( for example)

Answered 11/28/2012 by: aurick86
Senior Yellow Belt



Thanks a lot for your quick reply :)

I'm really new to Wise Package... Is Custom Action in the "Tables" tab ?

There I jus't don't understand what to do :(

Could you be more verbose please and help me doing so ? I would be very nice from you.








Answered 11/28/2012 by: 3rik
White Belt


Hey Eric, 

1) Make a batch file and name it Install.bat 

2) Now write these lines in that

@echo off
echo   Please be wait while VLC Media Player is installing …


“%Programfiles%\VideoLAN\VLC\uninstall.exe" /S /NCRC

) else (

“%Programfiles(x86)%\VideoLAN\VLC\uninstall.exe" /S /NCRC


ping -n 20 > NUL

msiexec /i "%~dp0YOUR MSI.msi" /qn

REM Return exit code to SCCM
exit /B %EXIT_CODE%

3) Now save the above file and Run as adminstrator. 

Thats it, you are done

Answered 11/28/2012 by: ontari.ontari
Black Belt


Thank you, but iirc this won't make a vlc-2.0.4.msi :/

Answered 11/28/2012 by: 3rik
White Belt


that wont make a msi, you said already you created msi right!!! put it there...(YOURMSI)

Answered 11/28/2012 by: ontari.ontari
Black Belt