Code: Select all
!define PRODUCT_VERSION "0.8.6f"
Code: Select all
OutFile ..\vlc-${PRODUCT_VERSION}-win32.exe
Code: Select all
Section /o "Mozilla plugin" SEC03
Code: Select all
Section "Mozilla plugin" SEC03
Code: Select all
start /w vlc-0.8.6f-win32.exe /S
Code: Select all
REM Remove (possible) self-msi-packaged VideoLAN 0.8.4a
%systemroot%\system32\MsiExec.exe /X{3F927A23-9913-4BBF-B70D-566327589B72} /PASSIVE
REM Remove earlier official VideoLAN versions
"%ProgramFiles%\VideoLAN\VLC\uninstall.exe" /S
REM Tidy up the removal of earlier versions
rmdir /s /q "%ProgramFiles%\VideoLAN"
REM Install VLC Player 0.9.8a with default options
\\distr\share\VLCplayer\vlc-0.9.8a-win32.exe /S
REM Continue with manual install of browser plugins - these won't be included in the uninstall after this
REM Install Mozilla VLC Plugin 0.9.8a
if exist "%ProgramFiles%\Mozilla Firefox\firefox.exe" %systemroot%\system32\xcopy.exe \\distr\share\VLCplayer\vlc-0.9.8a\mozilla\npvlc.dll "%ProgramFiles%\VideoLAN\VLC\" /y /c
if exist "%ProgramFiles%\Mozilla Firefox\firefox.exe" %systemroot%\system32\xcopy.exe \\distr\share\VLCplayer\vlc-0.9.8a\mozilla\npvlc.dll.manifest "%ProgramFiles%\VideoLAN\VLC\" /y /c
if exist "%ProgramFiles%\Mozilla Firefox\firefox.exe" %systemroot%\regedit.exe /s \\distr\share\VLCplayer\VLCMozPlug.reg
REM Install IE VLC Plugin 0.9.8a
%systemroot%\system32\xcopy.exe \\distr\share\VLCplayer\vlc-0.9.8a\activex\axvlc.dll "%ProgramFiles%\VideoLAN\VLC\" /y /c
%systemroot%\system32\xcopy.exe \\distr\share\VLCplayer\vlc-0.9.8a\activex\axvlc.dll.manifest "%ProgramFiles%\VideoLAN\VLC\" /y /c
%systemroot%\system32\regsvr32.exe /s "%ProgramFiles%\VideoLAN\VLC\axvlc.dll"
REM Allow desktop icon to be moved by users
%systemroot%\system32\cacls.exe "%ALLUSERSPROFILE%\Desktop\VLC Media Player.lnk" /e /g users:c
Code: Select all
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=0.9.8a]
"Description"="VLC Multimedia Plugin"
"Path"="C:\\Program Files\\VideoLAN\\VLC\\npvlc.dll"
"Product"="VLC media player"
"Vendor"="VideoLAN"
"Version"="0.9.8a"
Code: Select all
!ifdef INSTALL_MOZILLA
Section $Name_Section03 SEC03
SectionIn 1 3
!ifdef INSTALL_ACTIVEX
Section $Name_Section04 SEC04
SectionIn 1 3
;; !insertmacro MUI_LANGDLL_DISPLAY
;; MessageBox MB_YESNO|MB_ICONEXCLAMATION $Message_AlreadyInstalled IDNO done
;Run the uninstaller
;uninst:
;; ClearErrors
;; ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
You can do a full and silent installation, it just takes a bit of work.
1. Download and install nsis from http://nsis.sourceforge.net/Download. This will let you recompile the installation program.
2. Download and extract the VLC Windows Zip package from http://www.videolan.org/vlc/download-windows.html.
3. Open the vlc.win32.nsi file with Notepad
4. On line 7, enter the version. Should look something like this:5. Change line 23 so that the file name uses the correct version variable: ${PRODUCT_VERSION} instead of ${VERSION}. Like this:Code: Select all
!define PRODUCT_VERSION "0.8.6f"
6. The component list begins at about line 324. Each component looks like "Section "Component Name" SEC0#. If a '/o' is in front of the component name, it will not be selected by default. Remove the '/o' to have it be selected. Removing them from the Mozilla Plugin and Context Menu components turns it into a full install:Code: Select all
OutFile ..\vlc-${PRODUCT_VERSION}-win32.exe
becomes:Code: Select all
Section /o "Mozilla plugin" SEC03
7. From your command prompt (or script), run:Code: Select all
Section "Mozilla plugin" SEC03
BONUS: If you don't want VLC to be associated with some file types, put a semicolon in front of the line containing that extension. That list begins on line 110. I did this for DRM enabled files like WMA, WMV, ASF, and ASX.Code: Select all
start /w vlc-0.8.6f-win32.exe /S
Code: Select all
%~dp0vlc-1.0.5-win32.exe /L=1033 /S /NCRC
del "%ALLUSERSPROFILE%\Desktop\VLC media player.lnk"
rd "%ALLUSERSPROFILE%\Start Menu\Programs\VideoLAN\" /s /q
MKDIR "%ALLUSERSPROFILE%\Start Menu\Programs\VideoLAN\"
copy "VLC media player.lnk" "%ALLUSERSPROFILE%\Start Menu\Programs\VideoLAN\"
Code: Select all
"C:\Program Files\VideoLAN\VLC\vlc.exe" --no-qt-privacy-ask
Sure, set qt-privacy-ask to 0 in vlcrc.Well... My silent install runs perfect! But there ist still the question about privacy and updating functions...!
Icon to VLC starts with:Code: Select all
%~dp0vlc-1.0.5-win32.exe /L=1033 /S /NCRC del "%ALLUSERSPROFILE%\Desktop\VLC media player.lnk" rd "%ALLUSERSPROFILE%\Start Menu\Programs\VideoLAN\" /s /q MKDIR "%ALLUSERSPROFILE%\Start Menu\Programs\VideoLAN\" copy "VLC media player.lnk" "%ALLUSERSPROFILE%\Start Menu\Programs\VideoLAN\"
WORKS FINE!Code: Select all
"C:\Program Files\VideoLAN\VLC\vlc.exe" --no-qt-privacy-ask
If i start VLC with the icon, the privacy-question does not appear... BUT if i open a *.MP3 oder anything directly, the question will be displayed... Thats not what i want!
I'll deploying vlc for 1000+ PCs and its note possible that every user must configure these settings self.
Are there any settings, registry-keys or something else to eliminate this question?! I also need a *no auto-update* function... But this can wait...
Code: Select all
MessageBox MB_YESNO|MB_ICONEXCLAMATION $Message_AlreadyInstalled IDNO done
Code: Select all
MessageBox MB_YESNO|MB_ICONEXCLAMATION $Message_AlreadyInstalled /SD IDNO IDNO done
Nice script, so I hope you didn't mind me tweaking it a bit so I can use it through LogMeIn One2Many. Here's my version:I know this topic is a little old, but here is what I came up with to perform a full silent install of the latest version of VLC with firefox addon. I know it is a little complex, but it works on 32bit systems and 64bit and uninstalls the program before the install in case you are upgrading the program and sets VLC as the default video player for some of the popular formats ie vob wmv. Tested on VLC Version 1.1.9.
Code: Select all
@echo off
set vlcvers=1.1.10
set pf=
set rf=
if defined ProgramFiles(x86) echo This is a 64bit system
if defined ProgramFiles(x86) set pf=%ProgramFiles(x86)%
if defined ProgramFiles(x86) set rf=\Wow6432Node
if not defined ProgramFiles(x86) echo This is a 64bit system
if not defined ProgramFiles(x86) set pf=%ProgramFiles%
if not defined ProgramFiles(x86) set rf=
echo Killing browser processes
taskkill /t /im firefox.exe
taskkill /t /f /im firefox.exe
taskkill /t /im iexplorer.exe
taskkill /t /f /im iexplorer.exe
echo Uninstalling Old VLC Versions
if exist "%pf%\VideoLAN\VLC\uninstall.exe" start "Uninstall old VLC" /wait "%pf%\VideoLAN\VLC\uninstall.exe" /S /NCRC
echo Waiting for system to catch up, even though I use /wait before!
sleep 10
echo Installing VLC Media player
start "Install new VLC" /wait vlc-%vlcvers%-win32 /L=1033 /S /NCRC
echo Setting VLC as Default Media player
reg add HKCR\.ASF /v @ /t REG_SZ /d "VLC.asf" /f
reg add HKCR\.ASX /v @ /t REG_SZ /d "VLC.asf" /f
reg add HKCR\.AVI /v @ /t REG_SZ /d "VLC.asf" /f
reg add HKCR\.DIVX /v @ /t REG_SZ /d "VLC.asf" /f
reg add HKCR\.MPEG /v @ /t REG_SZ /d "VLC.asf" /f
reg add HKCR\.MPG /v @ /t REG_SZ /d "VLC.asf" /f
reg add HKCR\.VOB /v @ /t REG_SZ /d "VLC.asf" /f
reg add HKCR\.WMV /v @ /t REG_SZ /d "VLC.asf" /f
reg add HKCR\VlcFile /v @ /t REG_SZ /d "VLC File" /f
reg add HKCR\VlcFile\DefaultIcon /v @ /t REG_SZ /d "%pf%\VideoLAN\VLC\vlc.exe,0" /f
reg add HKCR\VlcFile\shell\Open\command /v @ /t REG_SZ /d "%pf%\VideoLAN\VLC\vlc.exe \"%L\"" /f
if exist "%pf%\Mozilla Firefox\firefox.exe" (
echo Adding Mozilla plugin
echo f|xcopy /s /c /d /e /h /i /r /y "npvlc.dll" "%pf%\VideoLAN\VLC\"
echo f|xcopy /s /c /d /e /h /i /r /y "npvlc.dll.manifest" "%pf%\VideoLAN\VLC\"
echo Setting Mozilla Plugin
reg add HKLM\SOFTWARE%rf%\MozillaPlugins\@videolan.org/vlc,version=%vlcver% /v Description /t REG_SZ /d "VLC Multimedia Plugin" /f
reg add HKLM\SOFTWARE%rf%\MozillaPlugins\@videolan.org/vlc,version=%vlcver% /v Path /t REG_SZ /d "%pf%\VideoLAN\VLC\npvlc.dll" /f
reg add HKLM\SOFTWARE%rf%\MozillaPlugins\@videolan.org/vlc,version=%vlcver% /v Product /t REG_SZ /d "VLC Multimedia Plugin" /f
reg add HKLM\SOFTWARE%rf%\MozillaPlugins\@videolan.org/vlc,version=%vlcver% /v Vendor /t REG_SZ /d "VideoLAN" /f
reg add HKLM\SOFTWARE%rf%\MozillaPlugins\@videolan.org/vlc,version=%vlcver% /v "Version" /t REG_SZ /d "%vlcver%" /f
)
echo Remove desktop icon
IF EXIST "%allusersprofile%\desktop\vlc media player.lnk" del "%allusersprofile%\desktop\vlc media player.lnk" /f /q
IF EXIST "%public%\Desktop\vlc media player.lnk" del "%public%\Desktop\vlc media player.lnk" /f /q
Could you be more specific? I made changes to the nsi file and compiled is there something specific to enter to automatically remove previous versions?Patch the installer .nsi file
See my previous post in this thread for silent uninstall.Could you be more specific? I made changes to the nsi file and compiled is there something specific to enter to automatically remove previous versions?
I've found the best way to make it silent is to fix the bug in compiler script on line 837. This should really be included in the source version.
It means that when doing a silent install and it detects an already installed version it will uninstall it. While if you are doing an interactive install it keeps the option to ask you.
Original readsAdd the silent default option /SD IDNOCode: Select all
MessageBox MB_YESNO|MB_ICONEXCLAMATION $Message_AlreadyInstalled IDNO done
Code: Select all
MessageBox MB_YESNO|MB_ICONEXCLAMATION $Message_AlreadyInstalled /SD IDNO IDNO done
Return to “VLC media player for Windows Troubleshooting”
Users browsing this forum: No registered users and 62 guests