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_RUSSSIAN} Russian 0
822 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} Brazilian EndLanguageCmp
824 !include "languages\french.nsh"
827 !include "languages\german.nsh"
830 !include "languages\italian.nsh"
833 !include "languages\hungarian.nsh"
836 !include "languages\romanian.nsh"
839 !include "languages\catalan.nsh"
842 !include "languages\bulgarian.nsh"
845 !include "languages\slovak.nsh"
848 !include "languages\polish.nsh"
851 !include "languages\dutch.nsh"
854 !include "languages\danish.nsh"
857 !include "languages\schinese.nsh"
860 !include "languages\finnish.nsh"
863 !include "languages\japanese.nsh"
866 !include "languages\bengali.nsh"
869 !include "languages\punjabi.nsh"
872 !include "languages\slovenian.nsh"
875 !include "languages\spanish.nsh"
878 !include "languages\estonian.nsh"
881 !include "languages\lithuanian.nsh"
884 !include "languages\basque.nsh"
887 !include "languages\serbian.nsh"
890 !include "languages\Russian.nsh"
893 !include "languages\brazilian_portuguese.nsh"
896 ReadRegStr $R0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
900 MessageBox MB_YESNO|MB_ICONEXCLAMATION $Message_AlreadyInstalled /SD IDNO IDNO done
905 ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
910 Function .OnInstFailed
914 Function .OnInstSuccess
920 WriteUninstaller "$INSTDIR\uninstall.exe"
921 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "InstallDir" $INSTDIR
922 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "Version" "${VERSION}"
923 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\vlc.exe"
925 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
926 "DisplayName" "$(^Name)"
927 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
928 "UninstallString" "$INSTDIR\uninstall.exe"
929 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
930 "InstallLocation" "$INSTDIR"
931 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
932 "DisplayIcon" "$INSTDIR\vlc.exe"
933 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
934 "DisplayVersion" "${PRODUCT_VERSION}"
935 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
936 "URLInfoAbout" "${PRODUCT_WEB_SITE}"
937 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
938 "Publisher" "${PRODUCT_PUBLISHER}"
939 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
940 "VersionMajor" "@VERSION_MAJOR@"
941 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
942 "VersionMinor" "@VERSION_MINOR@"
945 ;;;;;;;;;;;;;;;;;;;;;;;;
946 ; Uninstaller sections ;
947 ;;;;;;;;;;;;;;;;;;;;;;;;
949 ; TrimNewlines (copied from NSIS documentation)
950 ; input, top of stack (e.g. whatever$\r$\n)
951 ; output, top of stack (replaces, with e.g. whatever)
952 ; modifies no other variables.
954 Function un.TrimNewlines
963 StrCmp $R2 "$\r" loop
964 StrCmp $R2 "$\n" loop
966 IntCmp $R1 0 no_trim_needed
975 Function un.RemoveEmptyDirs
977 !define Index 'Line${__LINE__}'
978 FindFirst $0 $1 "$INSTDIR$9*"
979 StrCmp $0 "" "${Index}-End"
981 StrCmp $1 "" "${Index}-End"
982 StrCmp $1 "." "${Index}-Next"
983 StrCmp $1 ".." "${Index}-Next"
988 Call un.RemoveEmptyDirs
1002 Section "un.$Name_Section91" SEC91
1004 SetShellVarContext all
1006 !insertmacro MacroAllExtensions DeleteContextMenu
1007 !insertmacro MacroAllExtensions UnRegisterExtensionSection
1008 !insertmacro MacroSkinExtensions UnRegisterExtensionSection
1009 !insertmacro DeleteContextMenuExt "Directory"
1011 ;remove activex plugin
1012 UnRegDLL "$INSTDIR\axvlc.dll"
1013 Delete /REBOOTOK "$INSTDIR\axvlc.dll"
1014 Delete /REBOOTOK "$INSTDIR\axvlc.dll.manifest"
1016 ;remove mozilla plugin
1021 !define Index 'Line${__LINE__}'
1027 EnumRegKey $R0 HKLM "SOFTWARE\Mozilla" "$R1"
1028 StrCmp $R0 "" "${Index}-End"
1030 ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins"
1031 StrCmp $R2 "" "${Index}-Loop" ""
1033 ; old files (0.8.5 and before) that may be lying around
1034 Delete /REBOOTOK "$R2\npvlc.dll"
1035 Delete /REBOOTOK "$R2\libvlc.dll"
1036 Delete /REBOOTOK "$R2\vlcintf.xpt"
1037 Goto "${Index}-Loop"
1041 Delete /REBOOTOK "$INSTDIR\npvlc.dll"
1042 Delete /REBOOTOK "$INSTDIR\npvlc.dll.manifest"
1044 RMDir "$SMPROGRAMS\VideoLAN"
1045 RMDir /r $SMPROGRAMS\VideoLAN
1047 FileOpen $UninstallLog "$INSTDIR\uninstall.log" r
1050 FileRead $UninstallLog $R0
1051 IfErrors UninstallEnd
1053 Call un.TrimNewLines
1055 Delete "$INSTDIR\$R0"
1058 FileClose $UninstallLog
1059 Delete "$INSTDIR\uninstall.log"
1060 Delete "$INSTDIR\uninstall.exe"
1062 Call un.RemoveEmptyDirs
1065 DeleteRegKey HKLM Software\VideoLAN
1067 DeleteRegKey HKCR Applications\vlc.exe
1068 DeleteRegKey HKCR AudioCD\shell\PlayWithVLC
1069 DeleteRegKey HKCR DVD\shell\PlayWithVLC
1070 DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival"
1071 DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival
1072 DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival"
1073 DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival
1074 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoCDMovieOnArrival" "VLCPlayVCDMovieOnArrival"
1075 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival
1076 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlaySuperVideoCDMovieOnArrival" "VLCPlaySVCDMovieOnArrival"
1077 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival
1078 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDAudioOnArrival" "VLCPlayDVDAudioOnArrival"
1079 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival
1080 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoFilesOnArrival" "VLCPlayVideoFilesOnArrival"
1081 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival
1082 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayMusicFilesOnArrival" "VLCPlayMusicFilesOnArrival"
1083 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival
1085 DeleteRegKey HKLM Software\Clients\Media\VLC
1086 DeleteRegValue HKLM "Software\RegisteredApplications" "VLC"
1087 DeleteRegKey HKCR "VLC.MediaFile"
1088 DeleteRegKey HKCR "VLC.DVDMovie"
1089 DeleteRegKey HKCR "VLC.CDAudio"
1090 DeleteRegKey HKCR "VLC.VCDMovie"
1091 DeleteRegKey HKCR "VLC.SVCDMovie"
1092 DeleteRegKey HKCR "VLC.OPENFolder"
1096 "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}"
1099 "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
1101 Delete "$DESKTOP\VLC media player.lnk"
1103 DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
1104 DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
1108 Section /o "un.$Name_Section92" SEC92
1109 !insertmacro delprefs
1112 ; Uninstaller section descriptions
1113 !insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
1114 !insertmacro MUI_DESCRIPTION_TEXT ${SEC91} $Desc_Section91
1115 !insertmacro MUI_DESCRIPTION_TEXT ${SEC92} $Desc_Section92
1116 !insertmacro MUI_UNFUNCTION_DESCRIPTION_END
1118 Function un.OnUnInstFailed
1122 Function un.OnUnInstSuccess
1124 Delete "$INSTDIR\UAC.dll"
1131 StrCmp 1223 $0 UAC_ElevationAborted
1132 StrCmp 0 $0 0 UAC_Err
1133 StrCmp 1 $1 0 UAC_Success
1137 MessageBox mb_iconstop "Unable to elevate, error $0"
1140 UAC_ElevationAborted:
1141 MessageBox mb_iconstop "This installer requires admin access, aborting!"
1146 StrCmp 3 $1 0 UAC_ElevationAborted
1147 MessageBox mb_iconstop "This installer requires admin access, try again"
1150 !insertmacro MUI_UNGETLANGUAGE
1152 !include "languages\english.nsh"
1153 StrCmp $LANGUAGE ${LANG_FRENCH} French 0
1154 StrCmp $LANGUAGE ${LANG_GERMAN} German 0
1155 StrCmp $LANGUAGE ${LANG_ITALIAN} Italian 0
1156 StrCmp $LANGUAGE ${LANG_HUNGARIAN} Hungarian 0
1157 StrCmp $LANGUAGE ${LANG_ROMANIAN} Romanian 0
1158 StrCmp $LANGUAGE ${LANG_CATALAN} Catalan 0
1159 StrCmp $LANGUAGE ${LANG_BULGARIAN} Bulgarian 0
1160 StrCmp $LANGUAGE ${LANG_SLOVAK} Slovak 0
1161 StrCmp $LANGUAGE ${LANG_POLISH} Polish 0
1162 StrCmp $LANGUAGE ${LANG_DUTCH} Dutch 0
1163 StrCmp $LANGUAGE ${LANG_DANISH} Danish 0
1164 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} SChinese 0
1165 StrCmp $LANGUAGE ${LANG_FINNISH} Finnish 0
1166 StrCmp $LANGUAGE ${LANG_JAPANESE} Japanese 0
1167 ; StrCmp $LANGUAGE ${LANG_BENGALI} Bengali 0
1168 ; StrCmp $LANGUAGE ${LANG_PUNJABI} Punjabi 0
1169 ; StrCmp $LANGUAGE ${LANG_SLOVENIAN} Slovenian 0
1170 StrCmp $LANGUAGE ${LANG_SPANISH} Spanish 0
1171 StrCmp $LANGUAGE ${LANG_ESTONIAN} Estonian 0
1172 StrCmp $LANGUAGE ${LANG_LITHUANIAN} Lithuanian 0
1173 StrCmp $LANGUAGE ${LANG_BASQUE} Basque 0
1174 StrCmp $LANGUAGE ${LANG_SERBIAN} Serbian 0
1175 StrCmp $LANGUAGE ${LANG_RUSSIAN} Russian 0
1176 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} Brazilian EndLanguageCmp
1178 !include "languages\french.nsh"
1181 !include "languages\german.nsh"
1184 !include "languages\italian.nsh"
1187 !include "languages\hungarian.nsh"
1190 !include "languages\romanian.nsh"
1193 !include "languages\catalan.nsh"
1196 !include "languages\bulgarian.nsh"
1199 !include "languages\slovak.nsh"
1202 !include "languages\polish.nsh"
1205 !include "languages\dutch.nsh"
1208 !include "languages\danish.nsh"
1211 !include "languages\schinese.nsh"
1214 !include "languages\finnish.nsh"
1217 !include "languages\japanese.nsh"
1220 !include "languages\bengali.nsh"
1223 !include "languages\punjabi.nsh"
1226 !include "languages\slovenian.nsh"
1229 !include "languages\spanish.nsh"
1232 !include "languages\estonian.nsh"
1235 !include "languages\lithuanian.nsh"
1238 !include "languages\basque.nsh"
1241 !include "languages\serbian.nsh"
1244 !include "languages\russian.nsh"
1247 !include "languages\brazilian_portuguese.nsh"