OffHand Posted October 14, 2008 Share Posted October 14, 2008 Hi guys,Can anyone help me out or point me in the right direction with the following bat script. What I would like it to do is check if VLC has been installed already, if it finds it uninstall it and install the new version. If it hasn't been installed already it should just install VLC.This is what I have so far but it still thinks VNC is installed.@echo offecho Removing VLC media playerset VLANDIR=C:\Program Files\VideoLANset UNINSTALLER=%VLANDIR%\VLC\uninstall.exeset OPTIONS=/Sif not exist "%UNINSTALLER%" goto good_endstart /wait "VLC uninstall" "%UNINSTALLER%" %OPTIONS%REM Unfortunately the uninstaller seems to fork a child process and the parentREM process exits immediately. So give it some time to uninstallping -n 5 127.0.0.1 > NUL:good_endECHO Installing VLC...vlc-0.9.4-win32.exe /S Link to comment Share on other sites More sharing options...
Yzöwl Posted October 14, 2008 Share Posted October 14, 2008 Have you taken a look at some of the examples in this topic!Although not a direct answer they may help you out! Link to comment Share on other sites More sharing options...
OffHand Posted October 14, 2008 Author Share Posted October 14, 2008 Have you taken a look at some of the examples in this topic!Although not a direct answer they may help you out!Thanks for the link but it looks like a pretty complex solution for what I want to achieve. For instance I do not care which version is installed. But I will try a few things tomorrow when I am at work and report back.Cheers,OffHand Link to comment Share on other sites More sharing options...
Yzöwl Posted October 14, 2008 Share Posted October 14, 2008 Have you tried the uninstallation routine provided here? Link to comment Share on other sites More sharing options...
OffHand Posted October 15, 2008 Author Share Posted October 15, 2008 Have you taken a look at some of the examples in this topic!Although not a direct answer they may help you out!Managed to get it working with the following script:@Echo offREM This will check if there is a previous version of VLC and uninstall it if it finds itif exist "%ProgramFiles%\VideoLAN\VLC\uninstall.exe" ( Echo Uninstalling previous VLC version... && ping -n 5 127.0.0.1>nul start /wait "VLC Uninstall" "%ProgramFiles%\VideoLAN\VLC\uninstall.exe" /S)REM I am removing the old VNC directory here.ping -n 10 127.0.0.1>nulECHO Removing old VLC directory...ping -n 2 127.0.0.1>nulRMDIR "%ProgramFiles%\VideoLAN" /S /QREM And install the new version.ECHO Installing VLC...vlc-0.9.4-win32.exe /S Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now