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 !define INSTALL_MOZILLA
26 ;;;;;;;;;;;;;;;;;;;;;;;;;
27 ; General configuration ;
28 ;;;;;;;;;;;;;;;;;;;;;;;;;
30 Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
31 @HAVE_WIN64_FALSE@ OutFile ..\vlc-${VERSION}-win32.exe
32 @HAVE_WIN64_TRUE@ OutFile ..\vlc-${VERSION}-win64.exe
33 InstallDir "$@PROGRAMFILES@\VideoLAN\VLC"
34 !ifdef NSIS_LZMA_COMPRESS_WHOLE
37 SetCompressor /SOLID lzma
42 BrandingText "${PRODUCT_GROUP} ${PRODUCT_NAME}"
44 InstType $Name_InstTypeRecommended
45 InstType $Name_InstTypeMinimum
46 InstType $Name_InstTypeFull
48 RequestExecutionLevel user
53 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
54 ; NSIS Modern User Interface configuration ;
55 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
57 ; MUI 1.67 compatible ------
61 !define MUI_ABORTWARNING
62 !define MUI_ICON "vlc.ico"
63 !define MUI_UNICON "vlc.ico"
64 !define MUI_COMPONENTSPAGE_SMALLDESC
68 !define MUI_WELCOMEPAGE_TITLE_3LINES
69 !insertmacro MUI_PAGE_WELCOME
71 !define MUI_LICENSEPAGE_BUTTON $(^NextBtn)
72 !define MUI_LICENSEPAGE_TEXT_BOTTOM $License_NextText
73 !insertmacro MUI_PAGE_LICENSE "COPYING.txt"
75 !insertmacro MUI_PAGE_COMPONENTS
77 !insertmacro MUI_PAGE_DIRECTORY
79 !insertmacro MUI_PAGE_INSTFILES
83 Exec '$INSTDIR\vlc.exe'
87 !insertmacro UAC.CallFunctionAsUser ExecAppFile
90 !define MUI_FINISHPAGE_RUN
91 !define MUI_FINISHPAGE_RUN_FUNCTION AppRunAs
92 !define MUI_FINISHPAGE_LINK $Link_VisitWebsite
93 !define MUI_FINISHPAGE_LINK_LOCATION "http://www.videolan.org/vlc/"
94 !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt"
95 !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
96 !define MUI_FINISHPAGE_NOREBOOTSUPPORT
97 !insertmacro MUI_PAGE_FINISH
100 !insertmacro MUI_UNPAGE_CONFIRM
101 !insertmacro MUI_UNPAGE_COMPONENTS
102 !insertmacro MUI_UNPAGE_INSTFILES
103 !insertmacro MUI_UNPAGE_FINISH
106 !insertmacro MUI_LANGUAGE "English" # first language is the default language
107 !insertmacro MUI_LANGUAGE "French"
108 !insertmacro MUI_LANGUAGE "German"
109 !insertmacro MUI_LANGUAGE "Spanish"
110 !insertmacro MUI_LANGUAGE "SimpChinese"
111 !insertmacro MUI_LANGUAGE "TradChinese"
112 !insertmacro MUI_LANGUAGE "Japanese"
113 !insertmacro MUI_LANGUAGE "Korean"
114 !insertmacro MUI_LANGUAGE "Italian"
115 !insertmacro MUI_LANGUAGE "Dutch"
116 !insertmacro MUI_LANGUAGE "Danish"
117 !insertmacro MUI_LANGUAGE "Swedish"
118 !insertmacro MUI_LANGUAGE "Norwegian"
119 !insertmacro MUI_LANGUAGE "Finnish"
120 !insertmacro MUI_LANGUAGE "Greek"
121 !insertmacro MUI_LANGUAGE "Russian"
122 !insertmacro MUI_LANGUAGE "Portuguese"
123 !insertmacro MUI_LANGUAGE "PortugueseBR"
124 !insertmacro MUI_LANGUAGE "Arabic"
125 !insertmacro MUI_LANGUAGE "Polish"
126 !insertmacro MUI_LANGUAGE "Romanian"
127 !insertmacro MUI_LANGUAGE "Slovak"
128 !insertmacro MUI_LANGUAGE "Serbian"
129 !insertmacro MUI_LANGUAGE "Czech"
130 !insertmacro MUI_LANGUAGE "Hungarian"
131 !insertmacro MUI_LANGUAGE "Catalan"
132 !insertmacro MUI_LANGUAGE "Bulgarian"
133 !insertmacro MUI_LANGUAGE "Estonian"
134 !insertmacro MUI_LANGUAGE "Lithuanian"
135 !insertmacro MUI_LANGUAGE "Basque"
137 ; Reserve files for solid compression
138 !insertmacro MUI_RESERVEFILE_LANGDLL
139 !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
143 ;;;;;;;;;;;;;;;;;;;;;;;
144 ; Macro and Functions ;
145 ;;;;;;;;;;;;;;;;;;;;;;;
147 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
148 ; 1. File type associations ;
149 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
151 ;; Function that registers one extension for VLC
152 Function RegisterExtension
153 ; back up old value for extension $R0 (eg. ".opt")
154 ReadRegStr $1 HKCR "$R0" ""
155 StrCmp $1 "" NoBackup
156 StrCmp $1 "VLC$R0" "NoBackup"
157 WriteRegStr HKCR "$R0" "VLC.backup" $1
159 WriteRegStr HKCR "$R0" "" "VLC$R0"
160 ReadRegStr $0 HKCR "VLC$R0" ""
161 WriteRegStr HKCR "VLC$R0" "" "VLC media file ($R0)"
162 WriteRegStr HKCR "VLC$R0\shell" "" "Open"
163 WriteRegStr HKCR "VLC$R0\shell\Open" "" $ShellAssociation_Play
164 WriteRegStr HKCR "VLC$R0\shell\Open" "MultiSelectModel" "Player"
165 WriteRegStr HKCR "VLC$R0\shell\Open\command" "" '"$INSTDIR\vlc.exe" --started-from-file "%1"'
166 WriteRegStr HKCR "VLC$R0\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
169 ; Vista and above detection
170 ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
172 StrCmp $R2 '6' ForVista ToEnd
174 WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities\FileAssociations" "$R0" "VLC$R0"
179 ;; Function that registers one skin extension for VLC
180 Function RegisterSkinExtension
181 ; back up old value for extension $R0 (eg. ".opt")
182 ReadRegStr $1 HKCR "$R0" ""
183 StrCmp $1 "" NoBackup
184 StrCmp $1 "VLC$R0" "NoBackup"
185 WriteRegStr HKCR "$R0" "VLC.backup" $1
187 WriteRegStr HKCR "$R0" "" "VLC$R0"
188 ReadRegStr $0 HKCR "VLC$R0" ""
189 WriteRegStr HKCR "VLC$R0" "" "VLC skin file ($R0)"
190 WriteRegStr HKCR "VLC$R0\shell" "" "Open"
191 WriteRegStr HKCR "VLC$R0\shell\Open" "" ""
192 WriteRegStr HKCR "VLC$R0\shell\Open\command" "" '"$INSTDIR\vlc.exe" -Iskins --skins2-last "%1"'
193 WriteRegStr HKCR "VLC$R0\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
196 ; Vista and above detection
197 ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
199 StrCmp $R2 '6' ForVista ToEnd
201 WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities\FileAssociations" "$R0" "VLC$R0"
206 ;; Function that removes one extension that VLC owns.
207 Function un.RegisterExtension
208 ;start of restore script
209 ReadRegStr $1 HKCR "$R0" ""
210 StrCmp $1 "VLC$R0" 0 NoOwn ; only do this if we own it
211 ; Read the old value from Backup
212 ReadRegStr $1 HKCR "$R0" "VLC.backup"
213 StrCmp $1 "" 0 Restore ; if backup="" then delete the whole key
214 DeleteRegKey HKCR "$R0"
217 WriteRegStr HKCR "$R0" "" $1
218 DeleteRegValue HKCR "$R0" "VLC.backup"
220 DeleteRegKey HKCR "VLC$R0" ;Delete key with association settings
221 DeleteRegKey HKLM "Software\Clients\Media\VLC\Capabilities\FileAssociations\VLC$R0" ; for vista
224 !macro RegisterExtensionSection EXT
229 Call RegisterExtension
234 !macro RegisterSkinExtensionSection EXT
239 Call RegisterSkinExtension
244 !macro UnRegisterExtensionSection EXT
247 Call un.RegisterExtension
251 !macro WriteRegStrSupportedTypes EXT
252 WriteRegStr HKCR Applications\vlc.exe\SupportedTypes ${EXT} ""
255 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
256 ; Extension lists Macros ;
257 ; Those macros calls the previous functions ;
258 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
260 !macro MacroAudioExtensions _action
261 !insertmacro ${_action} ".a52"
262 !insertmacro ${_action} ".aac"
263 !insertmacro ${_action} ".ac3"
264 !insertmacro ${_action} ".adt"
265 !insertmacro ${_action} ".adts"
266 !insertmacro ${_action} ".aif"
267 !insertmacro ${_action} ".aifc"
268 !insertmacro ${_action} ".aiff"
269 !insertmacro ${_action} ".au"
270 !insertmacro ${_action} ".amr"
271 !insertmacro ${_action} ".aob"
272 !insertmacro ${_action} ".ape"
273 !insertmacro ${_action} ".caf"
274 !insertmacro ${_action} ".cda"
275 !insertmacro ${_action} ".dts"
276 !insertmacro ${_action} ".flac"
277 !insertmacro ${_action} ".it"
278 !insertmacro ${_action} ".m4a"
279 !insertmacro ${_action} ".m4p"
280 !insertmacro ${_action} ".mid"
281 !insertmacro ${_action} ".mka"
282 !insertmacro ${_action} ".mlp"
283 !insertmacro ${_action} ".mod"
284 !insertmacro ${_action} ".mp1"
285 !insertmacro ${_action} ".mp2"
286 !insertmacro ${_action} ".mp3"
287 !insertmacro ${_action} ".mpc"
288 !insertmacro ${_action} ".oma"
289 !insertmacro ${_action} ".oga"
290 !insertmacro ${_action} ".rmi"
291 !insertmacro ${_action} ".snd"
292 !insertmacro ${_action} ".s3m"
293 !insertmacro ${_action} ".spx"
294 !insertmacro ${_action} ".tta"
295 !insertmacro ${_action} ".voc"
296 !insertmacro ${_action} ".vqf"
297 !insertmacro ${_action} ".w64"
298 !insertmacro ${_action} ".wav"
299 !insertmacro ${_action} ".wma"
300 !insertmacro ${_action} ".wv"
301 !insertmacro ${_action} ".xa"
302 !insertmacro ${_action} ".xm"
305 !macro MacroVideoExtensions _action
306 !insertmacro ${_action} ".3g2"
307 !insertmacro ${_action} ".3gp"
308 !insertmacro ${_action} ".3gp2"
309 !insertmacro ${_action} ".3gpp"
310 !insertmacro ${_action} ".amv"
311 !insertmacro ${_action} ".asf"
312 !insertmacro ${_action} ".avi"
313 !insertmacro ${_action} ".divx"
314 !insertmacro ${_action} ".dv"
315 !insertmacro ${_action} ".f4v"
316 !insertmacro ${_action} ".flv"
317 !insertmacro ${_action} ".gxf"
318 !insertmacro ${_action} ".m1v"
319 !insertmacro ${_action} ".m2t"
320 !insertmacro ${_action} ".m2v"
321 !insertmacro ${_action} ".m2ts"
322 !insertmacro ${_action} ".m4v"
323 !insertmacro ${_action} ".mkv"
324 !insertmacro ${_action} ".mov"
325 !insertmacro ${_action} ".mp2"
326 !insertmacro ${_action} ".mp2v"
327 !insertmacro ${_action} ".mp4"
328 !insertmacro ${_action} ".mp4v"
329 !insertmacro ${_action} ".mpa"
330 !insertmacro ${_action} ".mpe"
331 !insertmacro ${_action} ".mpeg"
332 !insertmacro ${_action} ".mpeg1"
333 !insertmacro ${_action} ".mpeg2"
334 !insertmacro ${_action} ".mpeg4"
335 !insertmacro ${_action} ".mpg"
336 !insertmacro ${_action} ".mpv2"
337 !insertmacro ${_action} ".mts"
338 !insertmacro ${_action} ".mtv"
339 !insertmacro ${_action} ".mxf"
340 !insertmacro ${_action} ".nsv"
341 !insertmacro ${_action} ".nuv"
342 !insertmacro ${_action} ".ogg"
343 !insertmacro ${_action} ".ogm"
344 !insertmacro ${_action} ".ogx"
345 !insertmacro ${_action} ".ogv"
346 !insertmacro ${_action} ".rec"
347 !insertmacro ${_action} ".rm"
348 !insertmacro ${_action} ".rmvb"
349 !insertmacro ${_action} ".tod"
350 !insertmacro ${_action} ".ts"
351 !insertmacro ${_action} ".tts"
352 !insertmacro ${_action} ".vob"
353 !insertmacro ${_action} ".vro"
354 !insertmacro ${_action} ".webm"
355 !insertmacro ${_action} ".wmv"
358 !macro MacroOtherExtensions _action
359 !insertmacro ${_action} ".asx"
360 !insertmacro ${_action} ".b4s"
361 !insertmacro ${_action} ".bin"
362 !insertmacro ${_action} ".cue"
363 !insertmacro ${_action} ".ifo"
364 !insertmacro ${_action} ".m3u"
365 !insertmacro ${_action} ".m3u8"
366 !insertmacro ${_action} ".pls"
367 !insertmacro ${_action} ".ram"
368 !insertmacro ${_action} ".sdp"
369 !insertmacro ${_action} ".vlc"
370 !insertmacro ${_action} ".xspf"
373 !macro MacroSkinExtensions _action
374 !insertmacro ${_action} ".vlt"
375 !insertmacro ${_action} ".wsz"
378 ; One macro to rule them all
379 !macro MacroAllExtensions _action
380 !insertmacro MacroAudioExtensions ${_action}
381 !insertmacro MacroVideoExtensions ${_action}
382 !insertmacro MacroOtherExtensions ${_action}
385 ;;;;;;;;;;;;;;;;;;;;;;;;;;;
386 ; 2. Context menu entries ;
387 ;;;;;;;;;;;;;;;;;;;;;;;;;;;
389 ; Generic function for adding the context menu for one ext.
390 !macro AddContextMenuExt EXT
391 WriteRegStr HKCR ${EXT}\shell\PlayWithVLC "" $ContextMenuEntry_PlayWith
392 WriteRegStr HKCR ${EXT}\shell\PlayWithVLC\command "" '"$INSTDIR\vlc.exe" --started-from-file --no-playlist-enqueue "%1"'
394 WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC "" $ContextMenuEntry_AddToPlaylist
395 WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC\command "" '"$INSTDIR\vlc.exe" --started-from-file --playlist-enqueue "%1"'
398 !macro AddContextMenu EXT
400 ReadRegStr $R0 HKCR ${EXT} ""
401 !insertmacro AddContextMenuExt $R0
405 !macro DeleteContextMenuExt EXT
406 DeleteRegKey HKCR ${EXT}\shell\PlayWithVLC
407 DeleteRegKey HKCR ${EXT}\shell\AddToPlaylistVLC
410 !macro DeleteContextMenu EXT
412 ReadRegStr $R0 HKCR ${EXT} ""
413 !insertmacro DeleteContextMenuExt $R0
417 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
419 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
423 !define Index 'Line${__LINE__}'
426 ; this will loop through all the logged users and "virtual" windows users
427 ; (it looks like users are only present in HKEY_USERS when they are logged in)
429 EnumRegKey $1 HKU "" $0
430 StrCmp $1 "" "${Index}-End"
432 ReadRegStr $2 HKU "$1\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" AppData
433 StrCmp $2 "" "${Index}-Loop"
444 !macro OpenUninstallLog
445 FileOpen $UninstallLog "$INSTDIR\uninstall.log" a
446 FileSeek $UninstallLog 0 END
449 !macro CloseUninstallLog
450 FileClose $UninstallLog
451 SetFileAttributes "$INSTDIR\uninstall.log" HIDDEN
457 !macro InstallFile FILEREGEX
459 !define Index 'Line${__LINE__}'
460 FindFirst $0 $1 "$INSTDIR\${FILEREGEX}"
461 StrCmp $0 "" "${Index}-End"
463 StrCmp $1 "" "${Index}-End"
464 FileWrite $UninstallLog "$1$\r$\n"
471 !macro InstallFolder FOLDER
474 Call InstallFolderInternal
477 Function InstallFolderInternal
479 !define Index 'Line${__LINE__}'
480 FindFirst $0 $1 "$INSTDIR\$9\*"
481 StrCmp $0 "" "${Index}-End"
483 StrCmp $1 "" "${Index}-End"
484 StrCmp $1 "." "${Index}-Next"
485 StrCmp $1 ".." "${Index}-Next"
486 IfFileExists "$9\$1\*" 0 "${Index}-Write"
490 Call InstallFolderInternal
495 FileWrite $UninstallLog "$9\$1$\r$\n"
505 ;;;;;;;;;;;;;;;;;;;;;;
506 ; Installer sections ;
509 ;;;;;;;;;;;;;;;;;;;;;;
511 Section $Name_Section01 SEC01
513 SetShellVarContext all
514 SetOutPath "$INSTDIR"
516 !insertmacro OpenUninstallLog
518 ; VLC.exe, libvlc.dll
519 !insertmacro InstallFile vlc.exe
520 !insertmacro InstallFile vlc.exe.manifest
521 !insertmacro InstallFile vlc-cache-gen.exe
524 !insertmacro InstallFile *.dll
527 !insertmacro InstallFile *.txt
530 !insertmacro InstallFolder plugins
531 !insertmacro InstallFolder locale
532 !insertmacro InstallFolder sdk
533 @BUILD_OSDMENU_TRUE@ !insertmacro InstallFolder osdmenu
534 @BUILD_SKINS_TRUE@ !insertmacro InstallFolder skins
535 @BUILD_LUA_TRUE@ !insertmacro InstallFolder lua
537 ; Generate the cache and add it to uninstall.log
538 ExecWait "$INSTDIR\vlc-cache-gen.exe $INSTDIR\plugins"
539 FindFirst $0 $1 "$INSTDIR\plugins\*.dat"
540 FileWrite $UninstallLog "plugins\$1$\r$\n"
546 WriteIniStr "$INSTDIR\${PRODUCT_GROUP} Website.url" "InternetShortcut" "URL" \
547 "${PRODUCT_WEB_SITE}"
548 FileWrite $UninstallLog "${PRODUCT_GROUP} Website.url$\r$\n"
549 WriteIniStr "$INSTDIR\Documentation.url" "InternetShortcut" "URL" \
550 "${PRODUCT_WEB_SITE}/doc/"
551 FileWrite $UninstallLog "Documentation.url$\r$\n"
552 WriteIniStr "$INSTDIR\New_Skins.url" "InternetShortcut" "URL" \
553 "${PRODUCT_WEB_SITE}/vlc/skins.php"
554 FileWrite $UninstallLog "New_Skins.url$\r$\n"
556 !insertmacro CloseUninstallLog
558 ; Add VLC to "recommended programs" for the following extensions
559 WriteRegStr HKCR Applications\vlc.exe "" ""
560 WriteRegStr HKCR Applications\vlc.exe "FriendlyAppName" "VLC media player"
561 WriteRegStr HKCR Applications\vlc.exe\shell\Open "" $ContextMenuEntry_PlayWith
562 WriteRegStr HKCR Applications\vlc.exe\shell\Open\command "" \
563 '"$INSTDIR\vlc.exe" --started-from-file "%1"'
564 !insertmacro MacroAllExtensions WriteRegStrSupportedTypes
566 ; Windows default programs Registration
567 ; Vista and above detection
568 ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
570 StrCmp $R1 '6' lbl_vista lbl_done
573 WriteRegStr HKLM "Software\RegisteredApplications" "VLC" "Software\Clients\Media\VLC\Capabilities"
574 WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationName" "VLC media player"
575 WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationDescription" "VLC - The video swiss knife"
576 WriteRegStr HKLM "Software\Clients\Media\VLC" "" "VLC media player"
577 WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "HideIconsCommand" "$\"$INSTDIR\spad-setup.exe$\" /HideIcons /S"
578 WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "ShowIconsCommand" "$\"$INSTDIR\spad-setup.exe$\" /ShowIcons /S"
579 WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "ReinstallCommand" "$\"$INSTDIR\spad-setup.exe$\" /Reinstall /S"
580 WriteRegDWORD HKLM "Software\Clients\Media\VLC\InstallInfo" "IconsVisible" 0x001
585 Section $Name_Section02a SEC02a
587 CreateDirectory "$SMPROGRAMS\VideoLAN"
588 CreateShortCut "$SMPROGRAMS\VideoLAN\Reset VLC media player preferences and cache files.lnk" \
589 "$INSTDIR\vlc.exe" "--reset-config --reset-plugins-cache vlc://quit"
590 CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player.lnk" \
591 "$INSTDIR\vlc.exe" ""
592 CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player skinned.lnk" \
593 "$INSTDIR\vlc.exe" "-Iskins"
594 CreateShortCut "$SMPROGRAMS\VideoLAN\Documentation.lnk" \
595 "$INSTDIR\Documentation.url"
596 CreateShortCut "$SMPROGRAMS\VideoLAN\Release Notes.lnk" \
597 "$INSTDIR\NEWS.txt" ""
598 CreateShortCut "$SMPROGRAMS\VideoLAN\${PRODUCT_GROUP} Website.lnk" \
599 "$INSTDIR\${PRODUCT_GROUP} Website.url"
602 Section $Name_Section02b SEC02b
604 CreateShortCut "$DESKTOP\VLC media player.lnk" \
605 "$INSTDIR\vlc.exe" ""
608 !ifdef INSTALL_MOZILLA
609 Section $Name_Section03 SEC03
612 SetOutPath "$INSTDIR"
613 !insertmacro OpenUninstallLog
614 !insertmacro InstallFile npvlc.dll
615 !insertmacro InstallFile npvlc.dll.manifest
616 !insertmacro CloseUninstallLog
618 !define Moz "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}"
619 WriteRegStr HKLM ${Moz} "Description" "VLC Multimedia Plugin"
620 WriteRegStr HKLM ${Moz} "Path" "$INSTDIR\npvlc.dll"
621 WriteRegStr HKLM ${Moz} "Product" "VLC media player"
622 WriteRegStr HKLM ${Moz} "Vendor" "VideoLAN"
623 WriteRegStr HKLM ${Moz} "Version" "${VERSION}"
627 !ifdef INSTALL_ACTIVEX
628 Section $Name_Section04 SEC04
631 SetOutPath "$INSTDIR"
632 !insertmacro OpenUninstallLog
633 !insertmacro InstallFile axvlc.dll
634 !insertmacro InstallFile axvlc.dll.manifest
635 !insertmacro CloseUninstallLog
636 RegDLL "$INSTDIR\axvlc.dll"
641 Section $Name_Section05 SEC05
643 WriteRegStr HKCR "AudioCD\shell\PlayWithVLC" "" $ContextMenuEntry_PlayWith
644 WriteRegStr HKCR "AudioCD\shell\PlayWithVLC\command" "" \
645 '"$INSTDIR\vlc.exe" --started-from-file cdda:///%1'
646 WriteRegStr HKCR "DVD\shell\PlayWithVLC" "" $ContextMenuEntry_PlayWith
647 WriteRegStr HKCR "DVD\shell\PlayWithVLC\command" "" \
648 '"$INSTDIR\vlc.exe" --started-from-file dvd:///%1'
650 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival" ""
651 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Action" $Action_OnArrivalDVD
652 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
653 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeProgID" "VLC.DVDMovie"
654 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeVerb" "Open"
655 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Provider" "VideoLAN VLC media player"
657 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival" ""
658 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Action" $Action_OnArrivalAudioCD
659 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
660 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeProgID" "VLC.CDAudio"
661 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeVerb" "Open"
662 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Provider" "VideoLAN VLC media player"
664 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoCDMovieOnArrival" "VLCPlayVCDMovieOnArrival" ""
665 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "Action" $Action_OnArrivalVCDMovie
666 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
667 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "InvokeProgID" "VLC.VCDMovie"
668 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "InvokeVerb" "Open"
669 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "Provider" "VideoLAN VLC media player"
671 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlaySuperVideoCDMovieOnArrival" "VLCPlaySVCDMovieOnArrival" ""
672 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "Action" $Action_OnArrivalSVCDMovie
673 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
674 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "InvokeProgID" "VLC.SVCDMovie"
675 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "InvokeVerb" "Open"
676 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "Provider" "VideoLAN VLC media player"
678 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDAudioOnArrival" "VLCPlayDVDAudioOnArrival" ""
679 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "Action" $Action_OnArrivalDVDAudio
680 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
681 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "InvokeProgID" "VLC.OPENFolder"
682 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "InvokeVerb" "Open"
683 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "Provider" "VideoLAN VLC media player"
685 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoFilesOnArrival" "VLCPlayVideoFilesOnArrival" ""
686 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "Action" $Action_OnArrivalVideoFiles
687 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
688 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "InvokeProgID" "VLC.OPENFolder"
689 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "InvokeVerb" "Open"
690 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "Provider" "VideoLAN VLC media player"
692 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayMusicFilesOnArrival" "VLCPlayMusicFilesOnArrival" ""
693 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "Action" $Action_OnArrivalMusicFiles
694 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
695 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "InvokeProgID" "VLC.OPENFolder"
696 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "InvokeVerb" "Open"
697 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "Provider" "VideoLAN VLC media player"
699 WriteRegStr HKCR "VLC.DVDMovie" "" "VLC DVD Movie"
700 WriteRegStr HKCR "VLC.DVDMovie\shell" "" "Open"
701 WriteRegStr HKCR "VLC.DVDMovie\shell\Open\command" "" \
702 '"$INSTDIR\vlc.exe" --started-from-file dvd:///%1'
703 WriteRegStr HKCR "VLC.DVDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
705 WriteRegStr HKCR "VLC.CDAudio" "" "VLC CD Audio"
706 WriteRegStr HKCR "VLC.CDAudio\shell" "" "Open"
707 WriteRegStr HKCR "VLC.CDAudio\shell\Open\command" "" \
708 '"$INSTDIR\vlc.exe" --started-from-file cdda:///%1'
709 WriteRegStr HKCR "VLC.CDAudio\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
711 WriteRegStr HKCR "VLC.VCDMovie" "" "VLC VCD Movie"
712 WriteRegStr HKCR "VLC.VCDMovie\shell" "" "Open"
713 WriteRegStr HKCR "VLC.VCDMovie\shell\Open\command" "" \
714 '"$INSTDIR\vlc.exe" --started-from-file vcd:///%1'
715 WriteRegStr HKCR "VLC.VCDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
717 WriteRegStr HKCR "VLC.SVCDMovie" "" "VLC SVCD Movie"
718 WriteRegStr HKCR "VLC.SVCDMovie\shell" "" "Open"
719 WriteRegStr HKCR "VLC.SVCDMovie\shell\Open\command" "" \
720 '"$INSTDIR\vlc.exe" --started-from-file vcd:///%1'
721 WriteRegStr HKCR "VLC.SVCDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
723 WriteRegStr HKCR "VLC.OPENFolder" "" "VLC Play content"
724 WriteRegStr HKCR "VLC.OPENFolder\shell" "" "Open"
725 WriteRegStr HKCR "VLC.OPENFolder\shell\Open\command" "" \
726 '"$INSTDIR\vlc.exe" %1'
727 WriteRegStr HKCR "VLC.OPENFolder\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
732 SectionGroup /e !$Name_Section06 SEC06
733 SectionGroup $Name_SectionGroupAudio
734 !insertmacro MacroAudioExtensions RegisterExtensionSection
736 SectionGroup $Name_SectionGroupVideo
737 !insertmacro MacroVideoExtensions RegisterExtensionSection
739 SectionGroup $Name_SectionGroupOther
740 !insertmacro MacroOtherExtensions RegisterExtensionSection
741 !insertmacro MacroSkinExtensions RegisterSkinExtensionSection
745 Section $Name_Section07 SEC07
747 !insertmacro MacroAllExtensions AddContextMenu
748 !insertmacro AddContextMenuExt "Directory"
751 Section /o $Name_Section08 SEC08
752 !insertmacro delprefs
755 ; Installer section descriptions
756 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
757 !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} $Desc_Section01
758 !insertmacro MUI_DESCRIPTION_TEXT ${SEC02a} $Desc_Section02a
759 !insertmacro MUI_DESCRIPTION_TEXT ${SEC02b} $Desc_Section02b
760 !ifdef INSTALL_MOZILLA
761 !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} $Desc_Section03
763 !ifdef INSTALL_ACTIVEX
764 !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} $Desc_Section04
766 !insertmacro MUI_DESCRIPTION_TEXT ${SEC05} $Desc_Section05
767 !insertmacro MUI_DESCRIPTION_TEXT ${SEC06} $Desc_Section06
768 !insertmacro MUI_DESCRIPTION_TEXT ${SEC07} $Desc_Section07
769 !insertmacro MUI_DESCRIPTION_TEXT ${SEC08} $Desc_Section08
770 !insertmacro MUI_FUNCTION_DESCRIPTION_END
775 @HAVE_WIN64_TRUE@ SetRegView 64
776 ReadRegStr $INSTDIR HKLM "${PRODUCT_DIR_REGKEY}" ""
777 StrCmp $INSTDIR "" 0 +1
778 StrCpy $INSTDIR "$@PROGRAMFILES@\VideoLAN\VLC"
782 StrCmp 1223 $0 UAC_ElevationAborted
783 StrCmp 0 $0 0 UAC_Err
784 StrCmp 1 $1 0 UAC_Success
788 MessageBox mb_iconstop "Unable to elevate, error $0"
791 UAC_ElevationAborted:
792 MessageBox mb_iconstop "This installer requires admin access, aborting!"
797 StrCmp 3 $1 0 UAC_ElevationAborted
798 MessageBox mb_iconstop "This installer requires admin access, try again"
800 !insertmacro MUI_LANGDLL_DISPLAY
802 !include "languages\english.nsh"
803 StrCmp $LANGUAGE ${LANG_FRENCH} French 0
804 StrCmp $LANGUAGE ${LANG_GERMAN} German 0
805 StrCmp $LANGUAGE ${LANG_ITALIAN} Italian 0
806 StrCmp $LANGUAGE ${LANG_HUNGARIAN} Hungarian 0
807 StrCmp $LANGUAGE ${LANG_ROMANIAN} Romanian 0
808 StrCmp $LANGUAGE ${LANG_CATALAN} Catalan 0
809 StrCmp $LANGUAGE ${LANG_BULGARIAN} Bulgarian 0
810 StrCmp $LANGUAGE ${LANG_SLOVAK} Slovak 0
811 StrCmp $LANGUAGE ${LANG_POLISH} Polish 0
812 StrCmp $LANGUAGE ${LANG_DUTCH} Dutch 0
813 StrCmp $LANGUAGE ${LANG_DANISH} Danish 0
814 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} SChinese 0
815 StrCmp $LANGUAGE ${LANG_FINNISH} Finnish 0
816 StrCmp $LANGUAGE ${LANG_JAPANESE} Japanese 0
817 ; StrCmp $LANGUAGE ${LANG_BENGALI} Bengali 0
818 ; StrCmp $LANGUAGE ${LANG_PUNJABI} Punjabi 0
819 ; StrCmp $LANGUAGE ${LANG_SLOVENIAN} Slovenian 0
820 StrCmp $LANGUAGE ${LANG_SPANISH} Spanish 0
821 StrCmp $LANGUAGE ${LANG_ESTONIAN} Estonian 0
822 StrCmp $LANGUAGE ${LANG_LITHUANIAN} Lithuanian 0
823 StrCmp $LANGUAGE ${LANG_BASQUE} Basque 0
824 StrCmp $LANGUAGE ${LANG_SERBIAN} Serbian 0
825 StrCmp $LANGUAGE ${LANG_RUSSIAN} Russian 0
826 StrCmp $LANGUAGE ${LANG_HEBREW} Hebrew 0
827 StrCmp $LANGUAGE ${LANG_GALICIAN} Galician 0
828 StrCmp $LANGUAGE ${LANG_SWEDISH} Swedish 0
829 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} Brazilian EndLanguageCmp
831 !include "languages\french.nsh"
834 !include "languages\german.nsh"
837 !include "languages\italian.nsh"
840 !include "languages\hungarian.nsh"
843 !include "languages\romanian.nsh"
846 !include "languages\catalan.nsh"
849 !include "languages\bulgarian.nsh"
852 !include "languages\slovak.nsh"
855 !include "languages\polish.nsh"
858 !include "languages\dutch.nsh"
861 !include "languages\danish.nsh"
864 !include "languages\schinese.nsh"
867 !include "languages\finnish.nsh"
870 !include "languages\japanese.nsh"
873 !include "languages\bengali.nsh"
876 !include "languages\punjabi.nsh"
879 !include "languages\slovenian.nsh"
882 !include "languages\spanish.nsh"
885 !include "languages\estonian.nsh"
888 !include "languages\lithuanian.nsh"
891 !include "languages\basque.nsh"
894 !include "languages\serbian.nsh"
897 !include "languages\Russian.nsh"
900 !include "languages\hebrew.nsh"
903 !include "languages\galician.nsh"
906 !include "languages\swedish.nsh"
909 !include "languages\brazilian_portuguese.nsh"
912 ReadRegStr $R0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
916 MessageBox MB_YESNO|MB_ICONEXCLAMATION $Message_AlreadyInstalled /SD IDNO IDNO done
921 ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
926 Function .OnInstFailed
930 Function .OnInstSuccess
936 WriteUninstaller "$INSTDIR\uninstall.exe"
937 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "InstallDir" $INSTDIR
938 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "Version" "${VERSION}"
939 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\vlc.exe"
941 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
942 "DisplayName" "$(^Name)"
943 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
944 "UninstallString" "$INSTDIR\uninstall.exe"
945 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
946 "InstallLocation" "$INSTDIR"
947 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
948 "DisplayIcon" "$INSTDIR\vlc.exe"
949 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
950 "DisplayVersion" "${PRODUCT_VERSION}"
951 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
952 "URLInfoAbout" "${PRODUCT_WEB_SITE}"
953 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
954 "Publisher" "${PRODUCT_PUBLISHER}"
955 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
956 "VersionMajor" "@VERSION_MAJOR@"
957 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
958 "VersionMinor" "@VERSION_MINOR@"
961 ;;;;;;;;;;;;;;;;;;;;;;;;
962 ; Uninstaller sections ;
963 ;;;;;;;;;;;;;;;;;;;;;;;;
965 ; TrimNewlines (copied from NSIS documentation)
966 ; input, top of stack (e.g. whatever$\r$\n)
967 ; output, top of stack (replaces, with e.g. whatever)
968 ; modifies no other variables.
970 Function un.TrimNewlines
979 StrCmp $R2 "$\r" loop
980 StrCmp $R2 "$\n" loop
982 IntCmp $R1 0 no_trim_needed
991 Function un.RemoveEmptyDirs
993 !define Index 'Line${__LINE__}'
994 FindFirst $0 $1 "$INSTDIR$9*"
995 StrCmp $0 "" "${Index}-End"
997 StrCmp $1 "" "${Index}-End"
998 StrCmp $1 "." "${Index}-Next"
999 StrCmp $1 ".." "${Index}-Next"
1004 Call un.RemoveEmptyDirs
1009 RMDir "$INSTDIR$9$1"
1012 Goto "${Index}-Loop"
1018 Section "un.$Name_Section91" SEC91
1020 SetShellVarContext all
1022 !insertmacro MacroAllExtensions DeleteContextMenu
1023 !insertmacro MacroAllExtensions UnRegisterExtensionSection
1024 !insertmacro MacroSkinExtensions UnRegisterExtensionSection
1025 !insertmacro DeleteContextMenuExt "Directory"
1027 ;remove activex plugin
1028 UnRegDLL "$INSTDIR\axvlc.dll"
1029 Delete /REBOOTOK "$INSTDIR\axvlc.dll"
1030 Delete /REBOOTOK "$INSTDIR\axvlc.dll.manifest"
1032 ;remove mozilla plugin
1037 !define Index 'Line${__LINE__}'
1043 EnumRegKey $R0 HKLM "SOFTWARE\Mozilla" "$R1"
1044 StrCmp $R0 "" "${Index}-End"
1046 ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins"
1047 StrCmp $R2 "" "${Index}-Loop" ""
1049 ; old files (0.8.5 and before) that may be lying around
1050 Delete /REBOOTOK "$R2\npvlc.dll"
1051 Delete /REBOOTOK "$R2\libvlc.dll"
1052 Delete /REBOOTOK "$R2\vlcintf.xpt"
1053 Goto "${Index}-Loop"
1057 Delete /REBOOTOK "$INSTDIR\npvlc.dll"
1058 Delete /REBOOTOK "$INSTDIR\npvlc.dll.manifest"
1060 RMDir "$SMPROGRAMS\VideoLAN"
1061 RMDir /r $SMPROGRAMS\VideoLAN
1063 FileOpen $UninstallLog "$INSTDIR\uninstall.log" r
1066 FileRead $UninstallLog $R0
1067 IfErrors UninstallEnd
1069 Call un.TrimNewLines
1071 Delete "$INSTDIR\$R0"
1074 FileClose $UninstallLog
1075 Delete "$INSTDIR\uninstall.log"
1076 Delete "$INSTDIR\uninstall.exe"
1078 Call un.RemoveEmptyDirs
1081 DeleteRegKey HKLM Software\VideoLAN
1083 DeleteRegKey HKCR Applications\vlc.exe
1084 DeleteRegKey HKCR AudioCD\shell\PlayWithVLC
1085 DeleteRegKey HKCR DVD\shell\PlayWithVLC
1086 DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival"
1087 DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival
1088 DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival"
1089 DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival
1090 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoCDMovieOnArrival" "VLCPlayVCDMovieOnArrival"
1091 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival
1092 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlaySuperVideoCDMovieOnArrival" "VLCPlaySVCDMovieOnArrival"
1093 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival
1094 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDAudioOnArrival" "VLCPlayDVDAudioOnArrival"
1095 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival
1096 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoFilesOnArrival" "VLCPlayVideoFilesOnArrival"
1097 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival
1098 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayMusicFilesOnArrival" "VLCPlayMusicFilesOnArrival"
1099 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival
1101 DeleteRegKey HKLM Software\Clients\Media\VLC
1102 DeleteRegValue HKLM "Software\RegisteredApplications" "VLC"
1103 DeleteRegKey HKCR "VLC.MediaFile"
1104 DeleteRegKey HKCR "VLC.DVDMovie"
1105 DeleteRegKey HKCR "VLC.CDAudio"
1106 DeleteRegKey HKCR "VLC.VCDMovie"
1107 DeleteRegKey HKCR "VLC.SVCDMovie"
1108 DeleteRegKey HKCR "VLC.OPENFolder"
1112 "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}"
1115 "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
1117 Delete "$DESKTOP\VLC media player.lnk"
1119 DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
1120 DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
1124 Section /o "un.$Name_Section92" SEC92
1125 !insertmacro delprefs
1128 ; Uninstaller section descriptions
1129 !insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
1130 !insertmacro MUI_DESCRIPTION_TEXT ${SEC91} $Desc_Section91
1131 !insertmacro MUI_DESCRIPTION_TEXT ${SEC92} $Desc_Section92
1132 !insertmacro MUI_UNFUNCTION_DESCRIPTION_END
1134 Function un.OnUnInstFailed
1138 Function un.OnUnInstSuccess
1140 Delete "$INSTDIR\UAC.dll"
1147 StrCmp 1223 $0 UAC_ElevationAborted
1148 StrCmp 0 $0 0 UAC_Err
1149 StrCmp 1 $1 0 UAC_Success
1153 MessageBox mb_iconstop "Unable to elevate, error $0"
1156 UAC_ElevationAborted:
1157 MessageBox mb_iconstop "This installer requires admin access, aborting!"
1162 StrCmp 3 $1 0 UAC_ElevationAborted
1163 MessageBox mb_iconstop "This installer requires admin access, try again"
1166 !insertmacro MUI_UNGETLANGUAGE
1168 !include "languages\english.nsh"
1169 StrCmp $LANGUAGE ${LANG_FRENCH} French 0
1170 StrCmp $LANGUAGE ${LANG_GERMAN} German 0
1171 StrCmp $LANGUAGE ${LANG_ITALIAN} Italian 0
1172 StrCmp $LANGUAGE ${LANG_HUNGARIAN} Hungarian 0
1173 StrCmp $LANGUAGE ${LANG_ROMANIAN} Romanian 0
1174 StrCmp $LANGUAGE ${LANG_CATALAN} Catalan 0
1175 StrCmp $LANGUAGE ${LANG_BULGARIAN} Bulgarian 0
1176 StrCmp $LANGUAGE ${LANG_SLOVAK} Slovak 0
1177 StrCmp $LANGUAGE ${LANG_POLISH} Polish 0
1178 StrCmp $LANGUAGE ${LANG_DUTCH} Dutch 0
1179 StrCmp $LANGUAGE ${LANG_DANISH} Danish 0
1180 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} SChinese 0
1181 StrCmp $LANGUAGE ${LANG_FINNISH} Finnish 0
1182 StrCmp $LANGUAGE ${LANG_JAPANESE} Japanese 0
1183 ; StrCmp $LANGUAGE ${LANG_BENGALI} Bengali 0
1184 ; StrCmp $LANGUAGE ${LANG_PUNJABI} Punjabi 0
1185 ; StrCmp $LANGUAGE ${LANG_SLOVENIAN} Slovenian 0
1186 StrCmp $LANGUAGE ${LANG_SPANISH} Spanish 0
1187 StrCmp $LANGUAGE ${LANG_ESTONIAN} Estonian 0
1188 StrCmp $LANGUAGE ${LANG_LITHUANIAN} Lithuanian 0
1189 StrCmp $LANGUAGE ${LANG_BASQUE} Basque 0
1190 StrCmp $LANGUAGE ${LANG_SERBIAN} Serbian 0
1191 StrCmp $LANGUAGE ${LANG_RUSSIAN} Russian 0
1192 StrCmp $LANGUAGE ${LANG_HEBREW} Hebrew 0
1193 StrCmp $LANGUAGE ${LANG_GALICIAN} Galician 0
1194 StrCmp $LANGUAGE ${LANG_SWEDISH} Swedish 0
1195 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} Brazilian EndLanguageCmp
1197 !include "languages\french.nsh"
1200 !include "languages\german.nsh"
1203 !include "languages\italian.nsh"
1206 !include "languages\hungarian.nsh"
1209 !include "languages\romanian.nsh"
1212 !include "languages\catalan.nsh"
1215 !include "languages\bulgarian.nsh"
1218 !include "languages\slovak.nsh"
1221 !include "languages\polish.nsh"
1224 !include "languages\dutch.nsh"
1227 !include "languages\danish.nsh"
1230 !include "languages\schinese.nsh"
1233 !include "languages\finnish.nsh"
1236 !include "languages\japanese.nsh"
1239 !include "languages\bengali.nsh"
1242 !include "languages\punjabi.nsh"
1245 !include "languages\slovenian.nsh"
1248 !include "languages\spanish.nsh"
1251 !include "languages\estonian.nsh"
1254 !include "languages\lithuanian.nsh"
1257 !include "languages\basque.nsh"
1260 !include "languages\serbian.nsh"
1263 !include "languages\russian.nsh"
1266 !include "languages\hebrew.nsh"
1269 !include "languages\galician.nsh"
1272 !include "languages\swedish.nsh"
1275 !include "languages\brazilian_portuguese.nsh"