1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 ; NSIS installer script for vlc ;
3 ; (http://nsis.sourceforge.net) ;
4 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6 !include "languages\declaration.nsh"
8 !define PRODUCT_NAME "VLC media player"
9 !define VERSION @VERSION@
10 !define PRODUCT_VERSION @VERSION@
11 !define PRODUCT_GROUP "VideoLAN"
12 !define PRODUCT_PUBLISHER "VideoLAN"
13 !define PRODUCT_WEB_SITE "http://www.videolan.org/"
14 !define PRODUCT_DIR_REGKEY "Software\VideoLAN\VLC"
15 !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
16 !define PRODUCT_UNINST_ROOT_KEY "HKLM"
17 !define PRODUCT_ID "{ea92ef52-afe4-4212-bacb-dfe9fca94cd6}"
19 !define MUI_LANGDLL_REGISTRY_ROOT "HKLM"
20 !define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_DIR_REGKEY}"
21 !define MUI_LANGDLL_REGISTRY_VALUENAME "Language"
23 @HAVE_WIN64_FALSE@ !define INSTALL_ACTIVEX
24 @HAVE_WIN64_FALSE@ !define INSTALL_MOZILLA
29 ;;;;;;;;;;;;;;;;;;;;;;;;;
30 ; General configuration ;
31 ;;;;;;;;;;;;;;;;;;;;;;;;;
33 Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
34 OutFile ..\vlc-${VERSION}-win32.exe
35 InstallDir "$@PROGRAMFILES@\VideoLAN\VLC"
36 InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
37 !ifdef NSIS_LZMA_COMPRESS_WHOLE
40 SetCompressor /SOLID lzma
45 BrandingText "${PRODUCT_GROUP} ${PRODUCT_NAME}"
47 InstType $Name_InstTypeRecommended
48 InstType $Name_InstTypeMinimum
49 InstType $Name_InstTypeFull
51 RequestExecutionLevel user
56 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
57 ; NSIS Modern User Interface configuration ;
58 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
60 ; MUI 1.67 compatible ------
64 !define MUI_ABORTWARNING
65 !define MUI_ICON "vlc.ico"
66 !define MUI_UNICON "vlc.ico"
67 !define MUI_COMPONENTSPAGE_SMALLDESC
71 !define MUI_WELCOMEPAGE_TITLE_3LINES
72 !insertmacro MUI_PAGE_WELCOME
74 !define MUI_LICENSEPAGE_BUTTON $(^NextBtn)
75 !define MUI_LICENSEPAGE_TEXT_BOTTOM $License_NextText
76 !insertmacro MUI_PAGE_LICENSE "COPYING.txt"
78 !insertmacro MUI_PAGE_COMPONENTS
80 !insertmacro MUI_PAGE_DIRECTORY
82 !insertmacro MUI_PAGE_INSTFILES
86 Exec '$INSTDIR\vlc.exe'
90 !insertmacro UAC.CallFunctionAsUser ExecAppFile
93 !define MUI_FINISHPAGE_RUN
94 !define MUI_FINISHPAGE_RUN_FUNCTION AppRunAs
95 !define MUI_FINISHPAGE_LINK $Link_VisitWebsite
96 !define MUI_FINISHPAGE_LINK_LOCATION "http://www.videolan.org/vlc/"
97 !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt"
98 !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
99 !define MUI_FINISHPAGE_NOREBOOTSUPPORT
100 !insertmacro MUI_PAGE_FINISH
103 !insertmacro MUI_UNPAGE_CONFIRM
104 !insertmacro MUI_UNPAGE_COMPONENTS
105 !insertmacro MUI_UNPAGE_INSTFILES
106 !insertmacro MUI_UNPAGE_FINISH
109 !insertmacro MUI_LANGUAGE "English" # first language is the default language
110 !insertmacro MUI_LANGUAGE "French"
111 !insertmacro MUI_LANGUAGE "German"
112 !insertmacro MUI_LANGUAGE "Spanish"
113 !insertmacro MUI_LANGUAGE "SimpChinese"
114 !insertmacro MUI_LANGUAGE "TradChinese"
115 !insertmacro MUI_LANGUAGE "Japanese"
116 !insertmacro MUI_LANGUAGE "Korean"
117 !insertmacro MUI_LANGUAGE "Italian"
118 !insertmacro MUI_LANGUAGE "Dutch"
119 !insertmacro MUI_LANGUAGE "Danish"
120 !insertmacro MUI_LANGUAGE "Swedish"
121 !insertmacro MUI_LANGUAGE "Norwegian"
122 !insertmacro MUI_LANGUAGE "Finnish"
123 !insertmacro MUI_LANGUAGE "Greek"
124 !insertmacro MUI_LANGUAGE "Russian"
125 !insertmacro MUI_LANGUAGE "Portuguese"
126 !insertmacro MUI_LANGUAGE "PortugueseBR"
127 !insertmacro MUI_LANGUAGE "Arabic"
128 !insertmacro MUI_LANGUAGE "Polish"
129 !insertmacro MUI_LANGUAGE "Romanian"
130 !insertmacro MUI_LANGUAGE "Slovak"
131 !insertmacro MUI_LANGUAGE "Serbian"
132 !insertmacro MUI_LANGUAGE "Czech"
133 !insertmacro MUI_LANGUAGE "Hungarian"
134 !insertmacro MUI_LANGUAGE "Catalan"
135 !insertmacro MUI_LANGUAGE "Bulgarian"
136 !insertmacro MUI_LANGUAGE "Estonian"
137 !insertmacro MUI_LANGUAGE "Lithuanian"
138 !insertmacro MUI_LANGUAGE "Basque"
140 ; Reserve files for solid compression
141 !insertmacro MUI_RESERVEFILE_LANGDLL
142 !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
146 ;;;;;;;;;;;;;;;;;;;;;;;
147 ; Macro and Functions ;
148 ;;;;;;;;;;;;;;;;;;;;;;;
150 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
151 ; 1. File type associations ;
152 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
154 ;; Function that registers one extension for VLC
155 Function RegisterExtension
156 ; back up old value for extension $R0 (eg. ".opt")
157 ReadRegStr $1 HKCR "$R0" ""
158 StrCmp $1 "" NoBackup
159 StrCmp $1 "VLC$R0" "NoBackup"
160 WriteRegStr HKCR "$R0" "VLC.backup" $1
162 WriteRegStr HKCR "$R0" "" "VLC$R0"
163 ReadRegStr $0 HKCR "VLC$R0" ""
164 WriteRegStr HKCR "VLC$R0" "" "VLC media file ($R0)"
165 WriteRegStr HKCR "VLC$R0\shell" "" "Open"
166 WriteRegStr HKCR "VLC$R0\shell\Open" "" $ShellAssociation_Play
167 WriteRegStr HKCR "VLC$R0\shell\Open\command" "" '"$INSTDIR\vlc.exe" --started-from-file "%1"'
168 WriteRegStr HKCR "VLC$R0\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
171 ; Vista and above detection
172 ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
174 StrCmp $R2 '6' ForVista ToEnd
176 WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities\FileAssociations" "$R0" "VLC$R0"
181 ;; Function that registers one skin extension for VLC
182 Function RegisterSkinExtension
183 ; back up old value for extension $R0 (eg. ".opt")
184 ReadRegStr $1 HKCR "$R0" ""
185 StrCmp $1 "" NoBackup
186 StrCmp $1 "VLC$R0" "NoBackup"
187 WriteRegStr HKCR "$R0" "VLC.backup" $1
189 WriteRegStr HKCR "$R0" "" "VLC$R0"
190 ReadRegStr $0 HKCR "VLC$R0" ""
191 WriteRegStr HKCR "VLC$R0" "" "VLC skin file ($R0)"
192 WriteRegStr HKCR "VLC$R0\shell" "" "Open"
193 WriteRegStr HKCR "VLC$R0\shell\Open" "" ""
194 WriteRegStr HKCR "VLC$R0\shell\Open\command" "" '"$INSTDIR\vlc.exe" -Iskins --skins2-last "%1"'
195 WriteRegStr HKCR "VLC$R0\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
198 ; Vista and above detection
199 ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
201 StrCmp $R2 '6' ForVista ToEnd
203 WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities\FileAssociations" "$R0" "VLC$R0"
208 ;; Function that removes one extension that VLC owns.
209 Function un.RegisterExtension
210 ;start of restore script
211 ReadRegStr $1 HKCR "$R0" ""
212 StrCmp $1 "VLC$R0" 0 NoOwn ; only do this if we own it
213 ; Read the old value from Backup
214 ReadRegStr $1 HKCR "$R0" "VLC.backup"
215 StrCmp $1 "" 0 Restore ; if backup="" then delete the whole key
216 DeleteRegKey HKCR "$R0"
219 WriteRegStr HKCR "$R0" "" $1
220 DeleteRegValue HKCR "$R0" "VLC.backup"
222 DeleteRegKey HKCR "VLC$R0" ;Delete key with association settings
223 DeleteRegKey HKLM "Software\Clients\Media\VLC\Capabilities\FileAssociations\VLC$R0" ; for vista
226 !macro RegisterExtensionSection EXT
231 Call RegisterExtension
236 !macro RegisterSkinExtensionSection EXT
241 Call RegisterSkinExtension
246 !macro UnRegisterExtensionSection EXT
249 Call un.RegisterExtension
253 !macro WriteRegStrSupportedTypes EXT
254 WriteRegStr HKCR Applications\vlc.exe\SupportedTypes ${EXT} ""
257 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
258 ; Extension lists Macros ;
259 ; Those macros calls the previous functions ;
260 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
262 !macro MacroAudioExtensions _action
263 !insertmacro ${_action} ".a52"
264 !insertmacro ${_action} ".aac"
265 !insertmacro ${_action} ".ac3"
266 !insertmacro ${_action} ".adt"
267 !insertmacro ${_action} ".adts"
268 !insertmacro ${_action} ".aif"
269 !insertmacro ${_action} ".aifc"
270 !insertmacro ${_action} ".aiff"
271 !insertmacro ${_action} ".au"
272 !insertmacro ${_action} ".amr"
273 !insertmacro ${_action} ".aob"
274 !insertmacro ${_action} ".ape"
275 !insertmacro ${_action} ".caf"
276 !insertmacro ${_action} ".cda"
277 !insertmacro ${_action} ".dts"
278 !insertmacro ${_action} ".flac"
279 !insertmacro ${_action} ".it"
280 !insertmacro ${_action} ".m4a"
281 !insertmacro ${_action} ".m4p"
282 !insertmacro ${_action} ".mid"
283 !insertmacro ${_action} ".mka"
284 !insertmacro ${_action} ".mlp"
285 !insertmacro ${_action} ".mod"
286 !insertmacro ${_action} ".mp1"
287 !insertmacro ${_action} ".mp2"
288 !insertmacro ${_action} ".mp3"
289 !insertmacro ${_action} ".mpc"
290 !insertmacro ${_action} ".oma"
291 !insertmacro ${_action} ".oga"
292 !insertmacro ${_action} ".rmi"
293 !insertmacro ${_action} ".snd"
294 !insertmacro ${_action} ".s3m"
295 !insertmacro ${_action} ".spx"
296 !insertmacro ${_action} ".tta"
297 !insertmacro ${_action} ".voc"
298 !insertmacro ${_action} ".vqf"
299 !insertmacro ${_action} ".w64"
300 !insertmacro ${_action} ".wav"
301 !insertmacro ${_action} ".wma"
302 !insertmacro ${_action} ".wv"
303 !insertmacro ${_action} ".xa"
304 !insertmacro ${_action} ".xm"
307 !macro MacroVideoExtensions _action
308 !insertmacro ${_action} ".3g2"
309 !insertmacro ${_action} ".3gp"
310 !insertmacro ${_action} ".3gp2"
311 !insertmacro ${_action} ".3gpp"
312 !insertmacro ${_action} ".amv"
313 !insertmacro ${_action} ".asf"
314 !insertmacro ${_action} ".avi"
315 !insertmacro ${_action} ".divx"
316 !insertmacro ${_action} ".dv"
317 !insertmacro ${_action} ".f4v"
318 !insertmacro ${_action} ".flv"
319 !insertmacro ${_action} ".gxf"
320 !insertmacro ${_action} ".m1v"
321 !insertmacro ${_action} ".m2t"
322 !insertmacro ${_action} ".m2v"
323 !insertmacro ${_action} ".m2ts"
324 !insertmacro ${_action} ".m4v"
325 !insertmacro ${_action} ".mkv"
326 !insertmacro ${_action} ".mov"
327 !insertmacro ${_action} ".mp2"
328 !insertmacro ${_action} ".mp2v"
329 !insertmacro ${_action} ".mp4"
330 !insertmacro ${_action} ".mp4v"
331 !insertmacro ${_action} ".mpa"
332 !insertmacro ${_action} ".mpe"
333 !insertmacro ${_action} ".mpeg"
334 !insertmacro ${_action} ".mpeg1"
335 !insertmacro ${_action} ".mpeg2"
336 !insertmacro ${_action} ".mpeg4"
337 !insertmacro ${_action} ".mpg"
338 !insertmacro ${_action} ".mpv2"
339 !insertmacro ${_action} ".mts"
340 !insertmacro ${_action} ".mtv"
341 !insertmacro ${_action} ".mxf"
342 !insertmacro ${_action} ".nsv"
343 !insertmacro ${_action} ".nuv"
344 !insertmacro ${_action} ".ogg"
345 !insertmacro ${_action} ".ogm"
346 !insertmacro ${_action} ".ogx"
347 !insertmacro ${_action} ".ogv"
348 !insertmacro ${_action} ".rec"
349 !insertmacro ${_action} ".rm"
350 !insertmacro ${_action} ".rmvb"
351 !insertmacro ${_action} ".tod"
352 !insertmacro ${_action} ".ts"
353 !insertmacro ${_action} ".tts"
354 !insertmacro ${_action} ".vob"
355 !insertmacro ${_action} ".vro"
356 !insertmacro ${_action} ".webm"
357 !insertmacro ${_action} ".wmv"
360 !macro MacroOtherExtensions _action
361 !insertmacro ${_action} ".asx"
362 !insertmacro ${_action} ".b4s"
363 !insertmacro ${_action} ".bin"
364 !insertmacro ${_action} ".cue"
365 !insertmacro ${_action} ".ifo"
366 !insertmacro ${_action} ".m3u"
367 !insertmacro ${_action} ".m3u8"
368 !insertmacro ${_action} ".pls"
369 !insertmacro ${_action} ".ram"
370 !insertmacro ${_action} ".sdp"
371 !insertmacro ${_action} ".vlc"
372 !insertmacro ${_action} ".xspf"
375 !macro MacroSkinExtensions _action
376 !insertmacro ${_action} ".vlt"
377 !insertmacro ${_action} ".wsz"
380 ; One macro to rule them all
381 !macro MacroAllExtensions _action
382 !insertmacro MacroAudioExtensions ${_action}
383 !insertmacro MacroVideoExtensions ${_action}
384 !insertmacro MacroOtherExtensions ${_action}
387 ;;;;;;;;;;;;;;;;;;;;;;;;;;;
388 ; 2. Context menu entries ;
389 ;;;;;;;;;;;;;;;;;;;;;;;;;;;
391 ; Generic function for adding the context menu for one ext.
392 !macro AddContextMenuExt EXT
393 WriteRegStr HKCR ${EXT}\shell\PlayWithVLC "" $ContextMenuEntry_PlayWith
394 WriteRegStr HKCR ${EXT}\shell\PlayWithVLC\command "" '"$INSTDIR\vlc.exe" --started-from-file --no-playlist-enqueue "%1"'
396 WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC "" $ContextMenuEntry_AddToPlaylist
397 WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC\command "" '"$INSTDIR\vlc.exe" --started-from-file --playlist-enqueue "%1"'
400 !macro AddContextMenu EXT
402 ReadRegStr $R0 HKCR ${EXT} ""
403 !insertmacro AddContextMenuExt $R0
407 !macro DeleteContextMenuExt EXT
408 DeleteRegKey HKCR ${EXT}\shell\PlayWithVLC
409 DeleteRegKey HKCR ${EXT}\shell\AddToPlaylistVLC
412 !macro DeleteContextMenu EXT
414 ReadRegStr $R0 HKCR ${EXT} ""
415 !insertmacro DeleteContextMenuExt $R0
419 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
421 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
425 !define Index 'Line${__LINE__}'
428 ; this will loop through all the logged users and "virtual" windows users
429 ; (it looks like users are only present in HKEY_USERS when they are logged in)
431 EnumRegKey $1 HKU "" $0
432 StrCmp $1 "" "${Index}-End"
434 ReadRegStr $2 HKU "$1\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" AppData
435 StrCmp $2 "" "${Index}-Loop"
446 !macro OpenUninstallLog
447 FileOpen $UninstallLog "$INSTDIR\uninstall.log" a
448 FileSeek $UninstallLog 0 END
451 !macro CloseUninstallLog
452 FileClose $UninstallLog
453 SetFileAttributes "$INSTDIR\uninstall.log" HIDDEN
459 !macro InstallFile FILEREGEX
461 !define Index 'Line${__LINE__}'
462 FindFirst $0 $1 "$INSTDIR\${FILEREGEX}"
463 StrCmp $0 "" "${Index}-End"
465 StrCmp $1 "" "${Index}-End"
466 FileWrite $UninstallLog "$1$\r$\n"
473 !macro InstallFolder FOLDER
476 Call InstallFolderInternal
479 Function InstallFolderInternal
481 !define Index 'Line${__LINE__}'
482 FindFirst $0 $1 "$INSTDIR\$9\*"
483 StrCmp $0 "" "${Index}-End"
485 StrCmp $1 "" "${Index}-End"
486 StrCmp $1 "." "${Index}-Next"
487 StrCmp $1 ".." "${Index}-Next"
488 IfFileExists "$9\$1\*" 0 "${Index}-Write"
492 Call InstallFolderInternal
497 FileWrite $UninstallLog "$9\$1$\r$\n"
507 ;;;;;;;;;;;;;;;;;;;;;;
508 ; Installer sections ;
511 ;;;;;;;;;;;;;;;;;;;;;;
513 Section $Name_Section01 SEC01
515 SetShellVarContext all
516 SetOutPath "$INSTDIR"
518 !insertmacro OpenUninstallLog
520 ; VLC.exe, libvlc.dll
521 !insertmacro InstallFile vlc.exe
522 !insertmacro InstallFile vlc.exe.manifest
523 !insertmacro InstallFile vlc-cache-gen.exe
526 !insertmacro InstallFile *.dll
529 !insertmacro InstallFile *.txt
532 !insertmacro InstallFolder plugins
533 !insertmacro InstallFolder locale
534 @BUILD_OSDMENU_TRUE@ !insertmacro InstallFolder osdmenu
535 @BUILD_SKINS_TRUE@ !insertmacro InstallFolder skins
536 @BUILD_LUA_TRUE@ !insertmacro InstallFolder lua
538 ; Generate the cache and add it to uninstall.log
539 ExecWait "$INSTDIR\vlc-cache-gen.exe $INSTDIR\plugins"
540 FindFirst $0 $1 "$INSTDIR\plugins\*.dat"
541 FileWrite $UninstallLog "plugins\$1$\r$\n"
547 WriteIniStr "$INSTDIR\${PRODUCT_GROUP} Website.url" "InternetShortcut" "URL" \
548 "${PRODUCT_WEB_SITE}"
549 FileWrite $UninstallLog "${PRODUCT_GROUP} Website.url$\r$\n"
550 WriteIniStr "$INSTDIR\Documentation.url" "InternetShortcut" "URL" \
551 "${PRODUCT_WEB_SITE}/doc/"
552 FileWrite $UninstallLog "Documentation.url$\r$\n"
553 WriteIniStr "$INSTDIR\New_Skins.url" "InternetShortcut" "URL" \
554 "${PRODUCT_WEB_SITE}/vlc/skins.php"
555 FileWrite $UninstallLog "New_Skins.url$\r$\n"
557 !insertmacro CloseUninstallLog
559 ; Add VLC to "recommended programs" for the following extensions
560 WriteRegStr HKCR Applications\vlc.exe "" ""
561 WriteRegStr HKCR Applications\vlc.exe "FriendlyAppName" "VLC media player"
562 WriteRegStr HKCR Applications\vlc.exe\shell\Open "" $ContextMenuEntry_PlayWith
563 WriteRegStr HKCR Applications\vlc.exe\shell\Open\command "" \
564 '"$INSTDIR\vlc.exe" --started-from-file "%1"'
565 !insertmacro MacroAllExtensions WriteRegStrSupportedTypes
567 ; Windows default programs Registration
568 ; Vista and above detection
569 ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
571 StrCmp $R1 '6' lbl_vista lbl_done
574 WriteRegStr HKLM "Software\RegisteredApplications" "VLC" "Software\Clients\Media\VLC\Capabilities"
575 WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationName" "VLC media player"
576 WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationDescription" "VLC - The video swiss knife"
577 WriteRegStr HKLM "Software\Clients\Media\VLC" "" "VLC media player"
578 WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "HideIconsCommand" "$\"$INSTDIR\spad-setup.exe$\" /HideIcons /S"
579 WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "ShowIconsCommand" "$\"$INSTDIR\spad-setup.exe$\" /ShowIcons /S"
580 WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "ReinstallCommand" "$\"$INSTDIR\spad-setup.exe$\" /Reinstall /S"
581 WriteRegDWORD HKLM "Software\Clients\Media\VLC\InstallInfo" "IconsVisible" 0x001
586 Section $Name_Section02a SEC02a
588 CreateDirectory "$SMPROGRAMS\VideoLAN"
589 CreateShortCut "$SMPROGRAMS\VideoLAN\Reset VLC media player preferences and cache files.lnk" \
590 "$INSTDIR\vlc.exe" "--reset-config --reset-plugins-cache vlc://quit"
591 CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player.lnk" \
592 "$INSTDIR\vlc.exe" ""
593 CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player skinned.lnk" \
594 "$INSTDIR\vlc.exe" "-Iskins"
595 CreateShortCut "$SMPROGRAMS\VideoLAN\Documentation.lnk" \
596 "$INSTDIR\Documentation.url"
597 CreateShortCut "$SMPROGRAMS\VideoLAN\Release Notes.lnk" \
598 "$INSTDIR\NEWS.txt" ""
599 CreateShortCut "$SMPROGRAMS\VideoLAN\${PRODUCT_GROUP} Website.lnk" \
600 "$INSTDIR\${PRODUCT_GROUP} Website.url"
603 Section $Name_Section02b SEC02b
605 CreateShortCut "$DESKTOP\VLC media player.lnk" \
606 "$INSTDIR\vlc.exe" ""
609 !ifdef INSTALL_MOZILLA
610 Section /o $Name_Section03 SEC03
613 SetOutPath "$INSTDIR"
614 !insertmacro OpenUninstallLog
615 !insertmacro InstallFile npvlc.dll
616 !insertmacro InstallFile npvlc.dll.manifest
617 !insertmacro CloseUninstallLog
619 !define Moz "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}"
620 WriteRegStr HKLM ${Moz} "Description" "VLC Multimedia Plugin"
621 WriteRegStr HKLM ${Moz} "Path" "$INSTDIR\npvlc.dll"
622 WriteRegStr HKLM ${Moz} "Product" "VLC media player"
623 WriteRegStr HKLM ${Moz} "Vendor" "VideoLAN"
624 WriteRegStr HKLM ${Moz} "Version" "${VERSION}"
628 !ifdef INSTALL_ACTIVEX
629 Section $Name_Section04 SEC04
632 SetOutPath "$INSTDIR"
633 !insertmacro OpenUninstallLog
634 !insertmacro InstallFile axvlc.dll
635 !insertmacro InstallFile axvlc.dll.manifest
636 !insertmacro CloseUninstallLog
637 RegDLL "$INSTDIR\axvlc.dll"
642 Section $Name_Section05 SEC05
644 WriteRegStr HKCR "AudioCD\shell\PlayWithVLC" "" $ContextMenuEntry_PlayWith
645 WriteRegStr HKCR "AudioCD\shell\PlayWithVLC\command" "" \
646 '"$INSTDIR\vlc.exe" --started-from-file cdda:///%1'
647 WriteRegStr HKCR "DVD\shell\PlayWithVLC" "" $ContextMenuEntry_PlayWith
648 WriteRegStr HKCR "DVD\shell\PlayWithVLC\command" "" \
649 '"$INSTDIR\vlc.exe" --started-from-file dvd:///%1'
651 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival" ""
652 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Action" $Action_OnArrivalDVD
653 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
654 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeProgID" "VLC.DVDMovie"
655 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeVerb" "Open"
656 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Provider" "VideoLAN VLC media player"
658 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival" ""
659 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Action" $Action_OnArrivalAudioCD
660 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
661 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeProgID" "VLC.CDAudio"
662 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeVerb" "Open"
663 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Provider" "VideoLAN VLC media player"
665 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoCDMovieOnArrival" "VLCPlayVCDMovieOnArrival" ""
666 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "Action" $Action_OnArrivalVCDMovie
667 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
668 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "InvokeProgID" "VLC.VCDMovie"
669 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "InvokeVerb" "Open"
670 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "Provider" "VideoLAN VLC media player"
672 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlaySuperVideoCDMovieOnArrival" "VLCPlaySVCDMovieOnArrival" ""
673 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "Action" $Action_OnArrivalSVCDMovie
674 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
675 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "InvokeProgID" "VLC.SVCDMovie"
676 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "InvokeVerb" "Open"
677 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "Provider" "VideoLAN VLC media player"
679 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDAudioOnArrival" "VLCPlayDVDAudioOnArrival" ""
680 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "Action" $Action_OnArrivalDVDAudio
681 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
682 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "InvokeProgID" "VLC.OPENFolder"
683 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "InvokeVerb" "Open"
684 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "Provider" "VideoLAN VLC media player"
686 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoFilesOnArrival" "VLCPlayVideoFilesOnArrival" ""
687 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "Action" $Action_OnArrivalVideoFiles
688 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
689 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "InvokeProgID" "VLC.OPENFolder"
690 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "InvokeVerb" "Open"
691 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "Provider" "VideoLAN VLC media player"
693 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayMusicFilesOnArrival" "VLCPlayMusicFilesOnArrival" ""
694 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "Action" $Action_OnArrivalMusicFiles
695 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
696 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "InvokeProgID" "VLC.OPENFolder"
697 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "InvokeVerb" "Open"
698 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "Provider" "VideoLAN VLC media player"
700 WriteRegStr HKCR "VLC.DVDMovie" "" "VLC DVD Movie"
701 WriteRegStr HKCR "VLC.DVDMovie\shell" "" "Open"
702 WriteRegStr HKCR "VLC.DVDMovie\shell\Open\command" "" \
703 '"$INSTDIR\vlc.exe" --started-from-file dvd:///%1'
704 WriteRegStr HKCR "VLC.DVDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
706 WriteRegStr HKCR "VLC.CDAudio" "" "VLC CD Audio"
707 WriteRegStr HKCR "VLC.CDAudio\shell" "" "Open"
708 WriteRegStr HKCR "VLC.CDAudio\shell\Open\command" "" \
709 '"$INSTDIR\vlc.exe" --started-from-file cdda:///%1'
710 WriteRegStr HKCR "VLC.CDAudio\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
712 WriteRegStr HKCR "VLC.VCDMovie" "" "VLC VCD Movie"
713 WriteRegStr HKCR "VLC.VCDMovie\shell" "" "Open"
714 WriteRegStr HKCR "VLC.VCDMovie\shell\Open\command" "" \
715 '"$INSTDIR\vlc.exe" --started-from-file vcd:///%1'
716 WriteRegStr HKCR "VLC.VCDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
718 WriteRegStr HKCR "VLC.SVCDMovie" "" "VLC SVCD Movie"
719 WriteRegStr HKCR "VLC.SVCDMovie\shell" "" "Open"
720 WriteRegStr HKCR "VLC.SVCDMovie\shell\Open\command" "" \
721 '"$INSTDIR\vlc.exe" --started-from-file vcd:///%1'
722 WriteRegStr HKCR "VLC.SVCDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
724 WriteRegStr HKCR "VLC.OPENFolder" "" "VLC Play content"
725 WriteRegStr HKCR "VLC.OPENFolder\shell" "" "Open"
726 WriteRegStr HKCR "VLC.OPENFolder\shell\Open\command" "" \
727 '"$INSTDIR\vlc.exe" %1'
728 WriteRegStr HKCR "VLC.OPENFolder\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
733 SectionGroup /e !$Name_Section06 SEC06
734 SectionGroup $Name_SectionGroupAudio
735 !insertmacro MacroAudioExtensions RegisterExtensionSection
737 SectionGroup $Name_SectionGroupVideo
738 !insertmacro MacroVideoExtensions RegisterExtensionSection
740 SectionGroup $Name_SectionGroupOther
741 !insertmacro MacroOtherExtensions RegisterExtensionSection
742 !insertmacro MacroSkinExtensions RegisterSkinExtensionSection
746 Section $Name_Section07 SEC07
748 !insertmacro MacroAllExtensions AddContextMenu
749 !insertmacro AddContextMenuExt "Directory"
752 Section /o $Name_Section08 SEC08
753 !insertmacro delprefs
756 ; Installer section descriptions
757 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
758 !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} $Desc_Section01
759 !insertmacro MUI_DESCRIPTION_TEXT ${SEC02a} $Desc_Section02a
760 !insertmacro MUI_DESCRIPTION_TEXT ${SEC02b} $Desc_Section02b
761 !ifdef INSTALL_MOZILLA
762 !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} $Desc_Section03
764 !ifdef INSTALL_ACTIVEX
765 !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} $Desc_Section04
767 !insertmacro MUI_DESCRIPTION_TEXT ${SEC05} $Desc_Section05
768 !insertmacro MUI_DESCRIPTION_TEXT ${SEC06} $Desc_Section06
769 !insertmacro MUI_DESCRIPTION_TEXT ${SEC07} $Desc_Section07
770 !insertmacro MUI_DESCRIPTION_TEXT ${SEC08} $Desc_Section08
771 !insertmacro MUI_FUNCTION_DESCRIPTION_END
778 StrCmp 1223 $0 UAC_ElevationAborted
779 StrCmp 0 $0 0 UAC_Err
780 StrCmp 1 $1 0 UAC_Success
784 MessageBox mb_iconstop "Unable to elevate, error $0"
787 UAC_ElevationAborted:
788 MessageBox mb_iconstop "This installer requires admin access, aborting!"
793 StrCmp 3 $1 0 UAC_ElevationAborted
794 MessageBox mb_iconstop "This installer requires admin access, try again"
796 !insertmacro MUI_LANGDLL_DISPLAY
798 !include "languages\english.nsh"
799 StrCmp $LANGUAGE ${LANG_FRENCH} French 0
800 StrCmp $LANGUAGE ${LANG_GERMAN} German 0
801 StrCmp $LANGUAGE ${LANG_ITALIAN} Italian 0
802 StrCmp $LANGUAGE ${LANG_HUNGARIAN} Hungarian 0
803 StrCmp $LANGUAGE ${LANG_ROMANIAN} Romanian 0
804 StrCmp $LANGUAGE ${LANG_CATALAN} Catalan 0
805 StrCmp $LANGUAGE ${LANG_BULGARIAN} Bulgarian 0
806 StrCmp $LANGUAGE ${LANG_SLOVAK} Slovak 0
807 StrCmp $LANGUAGE ${LANG_POLISH} Polish 0
808 StrCmp $LANGUAGE ${LANG_DUTCH} Dutch 0
809 StrCmp $LANGUAGE ${LANG_DANISH} Danish 0
810 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} SChinese 0
811 StrCmp $LANGUAGE ${LANG_FINNISH} Finnish 0
812 StrCmp $LANGUAGE ${LANG_JAPANESE} Japanese 0
813 ; StrCmp $LANGUAGE ${LANG_BENGALI} Bengali 0
814 ; StrCmp $LANGUAGE ${LANG_PUNJABI} Punjabi 0
815 ; StrCmp $LANGUAGE ${LANG_SLOVENIAN} Slovenian 0
816 StrCmp $LANGUAGE ${LANG_SPANISH} Spanish 0
817 StrCmp $LANGUAGE ${LANG_ESTONIAN} Estonian 0
818 StrCmp $LANGUAGE ${LANG_LITHUANIAN} Lithuanian 0
819 StrCmp $LANGUAGE ${LANG_BASQUE} Basque 0
820 StrCmp $LANGUAGE ${LANG_SERBIAN} Serbian 0
821 StrCmp $LANGUAGE ${LANG_RUSSIAN} Russian 0
822 StrCmp $LANGUAGE ${LANG_HEBREW} Hebrew 0
823 StrCmp $LANGUAGE ${LANG_GALICIAN} Galician 0
824 StrCmp $LANGUAGE ${LANG_SWEDISH} Swedish 0
825 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} Brazilian EndLanguageCmp
827 !include "languages\french.nsh"
830 !include "languages\german.nsh"
833 !include "languages\italian.nsh"
836 !include "languages\hungarian.nsh"
839 !include "languages\romanian.nsh"
842 !include "languages\catalan.nsh"
845 !include "languages\bulgarian.nsh"
848 !include "languages\slovak.nsh"
851 !include "languages\polish.nsh"
854 !include "languages\dutch.nsh"
857 !include "languages\danish.nsh"
860 !include "languages\schinese.nsh"
863 !include "languages\finnish.nsh"
866 !include "languages\japanese.nsh"
869 !include "languages\bengali.nsh"
872 !include "languages\punjabi.nsh"
875 !include "languages\slovenian.nsh"
878 !include "languages\spanish.nsh"
881 !include "languages\estonian.nsh"
884 !include "languages\lithuanian.nsh"
887 !include "languages\basque.nsh"
890 !include "languages\serbian.nsh"
893 !include "languages\Russian.nsh"
896 !include "languages\hebrew.nsh"
899 !include "languages\galician.nsh"
902 !include "languages\swedish.nsh"
905 !include "languages\brazilian_portuguese.nsh"
908 ReadRegStr $R0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
912 MessageBox MB_YESNO|MB_ICONEXCLAMATION $Message_AlreadyInstalled /SD IDNO IDNO done
917 ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
922 Function .OnInstFailed
926 Function .OnInstSuccess
932 WriteUninstaller "$INSTDIR\uninstall.exe"
933 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "InstallDir" $INSTDIR
934 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "Version" "${VERSION}"
935 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\vlc.exe"
937 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
938 "DisplayName" "$(^Name)"
939 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
940 "UninstallString" "$INSTDIR\uninstall.exe"
941 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
942 "InstallLocation" "$INSTDIR"
943 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
944 "DisplayIcon" "$INSTDIR\vlc.exe"
945 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
946 "DisplayVersion" "${PRODUCT_VERSION}"
947 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
948 "URLInfoAbout" "${PRODUCT_WEB_SITE}"
949 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
950 "Publisher" "${PRODUCT_PUBLISHER}"
951 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
952 "VersionMajor" "@VERSION_MAJOR@"
953 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
954 "VersionMinor" "@VERSION_MINOR@"
957 ;;;;;;;;;;;;;;;;;;;;;;;;
958 ; Uninstaller sections ;
959 ;;;;;;;;;;;;;;;;;;;;;;;;
961 ; TrimNewlines (copied from NSIS documentation)
962 ; input, top of stack (e.g. whatever$\r$\n)
963 ; output, top of stack (replaces, with e.g. whatever)
964 ; modifies no other variables.
966 Function un.TrimNewlines
975 StrCmp $R2 "$\r" loop
976 StrCmp $R2 "$\n" loop
978 IntCmp $R1 0 no_trim_needed
987 Function un.RemoveEmptyDirs
989 !define Index 'Line${__LINE__}'
990 FindFirst $0 $1 "$INSTDIR$9*"
991 StrCmp $0 "" "${Index}-End"
993 StrCmp $1 "" "${Index}-End"
994 StrCmp $1 "." "${Index}-Next"
995 StrCmp $1 ".." "${Index}-Next"
1000 Call un.RemoveEmptyDirs
1005 RMDir "$INSTDIR$9$1"
1008 Goto "${Index}-Loop"
1014 Section "un.$Name_Section91" SEC91
1016 SetShellVarContext all
1018 !insertmacro MacroAllExtensions DeleteContextMenu
1019 !insertmacro MacroAllExtensions UnRegisterExtensionSection
1020 !insertmacro MacroSkinExtensions UnRegisterExtensionSection
1021 !insertmacro DeleteContextMenuExt "Directory"
1023 ;remove activex plugin
1024 UnRegDLL "$INSTDIR\axvlc.dll"
1025 Delete /REBOOTOK "$INSTDIR\axvlc.dll"
1026 Delete /REBOOTOK "$INSTDIR\axvlc.dll.manifest"
1028 ;remove mozilla plugin
1033 !define Index 'Line${__LINE__}'
1039 EnumRegKey $R0 HKLM "SOFTWARE\Mozilla" "$R1"
1040 StrCmp $R0 "" "${Index}-End"
1042 ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins"
1043 StrCmp $R2 "" "${Index}-Loop" ""
1045 ; old files (0.8.5 and before) that may be lying around
1046 Delete /REBOOTOK "$R2\npvlc.dll"
1047 Delete /REBOOTOK "$R2\libvlc.dll"
1048 Delete /REBOOTOK "$R2\vlcintf.xpt"
1049 Goto "${Index}-Loop"
1053 Delete /REBOOTOK "$INSTDIR\npvlc.dll"
1054 Delete /REBOOTOK "$INSTDIR\npvlc.dll.manifest"
1056 RMDir "$SMPROGRAMS\VideoLAN"
1057 RMDir /r $SMPROGRAMS\VideoLAN
1059 FileOpen $UninstallLog "$INSTDIR\uninstall.log" r
1062 FileRead $UninstallLog $R0
1063 IfErrors UninstallEnd
1065 Call un.TrimNewLines
1067 Delete "$INSTDIR\$R0"
1070 FileClose $UninstallLog
1071 Delete "$INSTDIR\uninstall.log"
1072 Delete "$INSTDIR\uninstall.exe"
1074 Call un.RemoveEmptyDirs
1077 DeleteRegKey HKLM Software\VideoLAN
1079 DeleteRegKey HKCR Applications\vlc.exe
1080 DeleteRegKey HKCR AudioCD\shell\PlayWithVLC
1081 DeleteRegKey HKCR DVD\shell\PlayWithVLC
1082 DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival"
1083 DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival
1084 DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival"
1085 DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival
1086 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoCDMovieOnArrival" "VLCPlayVCDMovieOnArrival"
1087 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival
1088 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlaySuperVideoCDMovieOnArrival" "VLCPlaySVCDMovieOnArrival"
1089 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival
1090 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDAudioOnArrival" "VLCPlayDVDAudioOnArrival"
1091 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival
1092 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoFilesOnArrival" "VLCPlayVideoFilesOnArrival"
1093 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival
1094 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayMusicFilesOnArrival" "VLCPlayMusicFilesOnArrival"
1095 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival
1097 DeleteRegKey HKLM Software\Clients\Media\VLC
1098 DeleteRegValue HKLM "Software\RegisteredApplications" "VLC"
1099 DeleteRegKey HKCR "VLC.MediaFile"
1100 DeleteRegKey HKCR "VLC.DVDMovie"
1101 DeleteRegKey HKCR "VLC.CDAudio"
1102 DeleteRegKey HKCR "VLC.VCDMovie"
1103 DeleteRegKey HKCR "VLC.SVCDMovie"
1104 DeleteRegKey HKCR "VLC.OPENFolder"
1108 "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}"
1111 "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
1113 Delete "$DESKTOP\VLC media player.lnk"
1115 DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
1116 DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
1120 Section /o "un.$Name_Section92" SEC92
1121 !insertmacro delprefs
1124 ; Uninstaller section descriptions
1125 !insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
1126 !insertmacro MUI_DESCRIPTION_TEXT ${SEC91} $Desc_Section91
1127 !insertmacro MUI_DESCRIPTION_TEXT ${SEC92} $Desc_Section92
1128 !insertmacro MUI_UNFUNCTION_DESCRIPTION_END
1130 Function un.OnUnInstFailed
1134 Function un.OnUnInstSuccess
1136 Delete "$INSTDIR\UAC.dll"
1143 StrCmp 1223 $0 UAC_ElevationAborted
1144 StrCmp 0 $0 0 UAC_Err
1145 StrCmp 1 $1 0 UAC_Success
1149 MessageBox mb_iconstop "Unable to elevate, error $0"
1152 UAC_ElevationAborted:
1153 MessageBox mb_iconstop "This installer requires admin access, aborting!"
1158 StrCmp 3 $1 0 UAC_ElevationAborted
1159 MessageBox mb_iconstop "This installer requires admin access, try again"
1162 !insertmacro MUI_UNGETLANGUAGE
1164 !include "languages\english.nsh"
1165 StrCmp $LANGUAGE ${LANG_FRENCH} French 0
1166 StrCmp $LANGUAGE ${LANG_GERMAN} German 0
1167 StrCmp $LANGUAGE ${LANG_ITALIAN} Italian 0
1168 StrCmp $LANGUAGE ${LANG_HUNGARIAN} Hungarian 0
1169 StrCmp $LANGUAGE ${LANG_ROMANIAN} Romanian 0
1170 StrCmp $LANGUAGE ${LANG_CATALAN} Catalan 0
1171 StrCmp $LANGUAGE ${LANG_BULGARIAN} Bulgarian 0
1172 StrCmp $LANGUAGE ${LANG_SLOVAK} Slovak 0
1173 StrCmp $LANGUAGE ${LANG_POLISH} Polish 0
1174 StrCmp $LANGUAGE ${LANG_DUTCH} Dutch 0
1175 StrCmp $LANGUAGE ${LANG_DANISH} Danish 0
1176 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} SChinese 0
1177 StrCmp $LANGUAGE ${LANG_FINNISH} Finnish 0
1178 StrCmp $LANGUAGE ${LANG_JAPANESE} Japanese 0
1179 ; StrCmp $LANGUAGE ${LANG_BENGALI} Bengali 0
1180 ; StrCmp $LANGUAGE ${LANG_PUNJABI} Punjabi 0
1181 ; StrCmp $LANGUAGE ${LANG_SLOVENIAN} Slovenian 0
1182 StrCmp $LANGUAGE ${LANG_SPANISH} Spanish 0
1183 StrCmp $LANGUAGE ${LANG_ESTONIAN} Estonian 0
1184 StrCmp $LANGUAGE ${LANG_LITHUANIAN} Lithuanian 0
1185 StrCmp $LANGUAGE ${LANG_BASQUE} Basque 0
1186 StrCmp $LANGUAGE ${LANG_SERBIAN} Serbian 0
1187 StrCmp $LANGUAGE ${LANG_RUSSIAN} Russian 0
1188 StrCmp $LANGUAGE ${LANG_HEBREW} Hebrew 0
1189 StrCmp $LANGUAGE ${LANG_GALICIAN} Galician 0
1190 StrCmp $LANGUAGE ${LANG_SWEDISH} Swedish 0
1191 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} Brazilian EndLanguageCmp
1193 !include "languages\french.nsh"
1196 !include "languages\german.nsh"
1199 !include "languages\italian.nsh"
1202 !include "languages\hungarian.nsh"
1205 !include "languages\romanian.nsh"
1208 !include "languages\catalan.nsh"
1211 !include "languages\bulgarian.nsh"
1214 !include "languages\slovak.nsh"
1217 !include "languages\polish.nsh"
1220 !include "languages\dutch.nsh"
1223 !include "languages\danish.nsh"
1226 !include "languages\schinese.nsh"
1229 !include "languages\finnish.nsh"
1232 !include "languages\japanese.nsh"
1235 !include "languages\bengali.nsh"
1238 !include "languages\punjabi.nsh"
1241 !include "languages\slovenian.nsh"
1244 !include "languages\spanish.nsh"
1247 !include "languages\estonian.nsh"
1250 !include "languages\lithuanian.nsh"
1253 !include "languages\basque.nsh"
1256 !include "languages\serbian.nsh"
1259 !include "languages\russian.nsh"
1262 !include "languages\hebrew.nsh"
1265 !include "languages\galician.nsh"
1268 !include "languages\swedish.nsh"
1271 !include "languages\brazilian_portuguese.nsh"