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 "Czech"
132 !insertmacro MUI_LANGUAGE "Hungarian"
133 !insertmacro MUI_LANGUAGE "Catalan"
134 !insertmacro MUI_LANGUAGE "Bulgarian"
135 !insertmacro MUI_LANGUAGE "Estonian"
136 !insertmacro MUI_LANGUAGE "Lithuanian"
137 !insertmacro MUI_LANGUAGE "Basque"
139 ; Reserve files for solid compression
140 !insertmacro MUI_RESERVEFILE_LANGDLL
141 !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
145 ;;;;;;;;;;;;;;;;;;;;;;;
146 ; Macro and Functions ;
147 ;;;;;;;;;;;;;;;;;;;;;;;
149 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
150 ; 1. File type associations ;
151 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
153 ;; Function that registers one extension for VLC
154 Function RegisterExtension
155 ; back up old value for extension $R0 (eg. ".opt")
156 ReadRegStr $1 HKCR "$R0" ""
157 StrCmp $1 "" NoBackup
158 StrCmp $1 "VLC$R0" "NoBackup"
159 WriteRegStr HKCR "$R0" "VLC.backup" $1
161 WriteRegStr HKCR "$R0" "" "VLC$R0"
162 ReadRegStr $0 HKCR "VLC$R0" ""
163 WriteRegStr HKCR "VLC$R0" "" "VLC media file ($R0)"
164 WriteRegStr HKCR "VLC$R0\shell" "" "Open"
165 WriteRegStr HKCR "VLC$R0\shell\Open" "" $ShellAssociation_Play
166 WriteRegStr HKCR "VLC$R0\shell\Open\command" "" '"$INSTDIR\vlc.exe" --started-from-file "%1"'
167 WriteRegStr HKCR "VLC$R0\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
170 ; Vista and above detection
171 ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
173 StrCmp $R2 '6' ForVista ToEnd
175 WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities\FileAssociations" "$R0" "VLC$R0"
180 ;; Function that registers one skin extension for VLC
181 Function RegisterSkinExtension
182 ; back up old value for extension $R0 (eg. ".opt")
183 ReadRegStr $1 HKCR "$R0" ""
184 StrCmp $1 "" NoBackup
185 StrCmp $1 "VLC$R0" "NoBackup"
186 WriteRegStr HKCR "$R0" "VLC.backup" $1
188 WriteRegStr HKCR "$R0" "" "VLC$R0"
189 ReadRegStr $0 HKCR "VLC$R0" ""
190 WriteRegStr HKCR "VLC$R0" "" "VLC skin file ($R0)"
191 WriteRegStr HKCR "VLC$R0\shell" "" "Open"
192 WriteRegStr HKCR "VLC$R0\shell\Open" "" ""
193 WriteRegStr HKCR "VLC$R0\shell\Open\command" "" '"$INSTDIR\vlc.exe" -Iskins --skins2-last "%1"'
194 WriteRegStr HKCR "VLC$R0\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
197 ; Vista and above detection
198 ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
200 StrCmp $R2 '6' ForVista ToEnd
202 WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities\FileAssociations" "$R0" "VLC$R0"
207 ;; Function that removes one extension that VLC owns.
208 Function un.RegisterExtension
209 ;start of restore script
210 ReadRegStr $1 HKCR "$R0" ""
211 StrCmp $1 "VLC$R0" 0 NoOwn ; only do this if we own it
212 ; Read the old value from Backup
213 ReadRegStr $1 HKCR "$R0" "VLC.backup"
214 StrCmp $1 "" 0 Restore ; if backup="" then delete the whole key
215 DeleteRegKey HKCR "$R0"
218 WriteRegStr HKCR "$R0" "" $1
219 DeleteRegValue HKCR "$R0" "VLC.backup"
221 DeleteRegKey HKCR "VLC$R0" ;Delete key with association settings
222 DeleteRegKey HKLM "Software\Clients\Media\VLC\Capabilities\FileAssociations\VLC$R0" ; for vista
225 !macro RegisterExtensionSection EXT
230 Call RegisterExtension
235 !macro RegisterSkinExtensionSection EXT
240 Call RegisterSkinExtension
245 !macro UnRegisterExtensionSection EXT
248 Call un.RegisterExtension
252 !macro WriteRegStrSupportedTypes EXT
253 WriteRegStr HKCR Applications\vlc.exe\SupportedTypes ${EXT} ""
256 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
257 ; Extension lists Macros ;
258 ; Those macros calls the previous functions ;
259 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
261 !macro MacroAudioExtensions _action
262 !insertmacro ${_action} ".a52"
263 !insertmacro ${_action} ".aac"
264 !insertmacro ${_action} ".ac3"
265 !insertmacro ${_action} ".adt"
266 !insertmacro ${_action} ".adts"
267 !insertmacro ${_action} ".aif"
268 !insertmacro ${_action} ".aifc"
269 !insertmacro ${_action} ".aiff"
270 !insertmacro ${_action} ".au"
271 !insertmacro ${_action} ".amr"
272 !insertmacro ${_action} ".aob"
273 !insertmacro ${_action} ".ape"
274 !insertmacro ${_action} ".caf"
275 !insertmacro ${_action} ".cda"
276 !insertmacro ${_action} ".dts"
277 !insertmacro ${_action} ".flac"
278 !insertmacro ${_action} ".it"
279 !insertmacro ${_action} ".m4a"
280 !insertmacro ${_action} ".m4p"
281 !insertmacro ${_action} ".mid"
282 !insertmacro ${_action} ".mka"
283 !insertmacro ${_action} ".mlp"
284 !insertmacro ${_action} ".mod"
285 !insertmacro ${_action} ".mp1"
286 !insertmacro ${_action} ".mp2"
287 !insertmacro ${_action} ".mp3"
288 !insertmacro ${_action} ".mpc"
289 !insertmacro ${_action} ".oma"
290 !insertmacro ${_action} ".oga"
291 !insertmacro ${_action} ".rmi"
292 !insertmacro ${_action} ".snd"
293 !insertmacro ${_action} ".s3m"
294 !insertmacro ${_action} ".spx"
295 !insertmacro ${_action} ".tta"
296 !insertmacro ${_action} ".voc"
297 !insertmacro ${_action} ".vqf"
298 !insertmacro ${_action} ".w64"
299 !insertmacro ${_action} ".wav"
300 !insertmacro ${_action} ".wma"
301 !insertmacro ${_action} ".wv"
302 !insertmacro ${_action} ".xa"
303 !insertmacro ${_action} ".xm"
306 !macro MacroVideoExtensions _action
307 !insertmacro ${_action} ".3g2"
308 !insertmacro ${_action} ".3gp"
309 !insertmacro ${_action} ".3gp2"
310 !insertmacro ${_action} ".3gpp"
311 !insertmacro ${_action} ".amv"
312 !insertmacro ${_action} ".asf"
313 !insertmacro ${_action} ".avi"
314 !insertmacro ${_action} ".divx"
315 !insertmacro ${_action} ".dv"
316 !insertmacro ${_action} ".f4v"
317 !insertmacro ${_action} ".flv"
318 !insertmacro ${_action} ".gxf"
319 !insertmacro ${_action} ".m1v"
320 !insertmacro ${_action} ".m2t"
321 !insertmacro ${_action} ".m2v"
322 !insertmacro ${_action} ".m2ts"
323 !insertmacro ${_action} ".m4v"
324 !insertmacro ${_action} ".mkv"
325 !insertmacro ${_action} ".mov"
326 !insertmacro ${_action} ".mp2"
327 !insertmacro ${_action} ".mp2v"
328 !insertmacro ${_action} ".mp4"
329 !insertmacro ${_action} ".mp4v"
330 !insertmacro ${_action} ".mpa"
331 !insertmacro ${_action} ".mpe"
332 !insertmacro ${_action} ".mpeg"
333 !insertmacro ${_action} ".mpeg1"
334 !insertmacro ${_action} ".mpeg2"
335 !insertmacro ${_action} ".mpeg4"
336 !insertmacro ${_action} ".mpg"
337 !insertmacro ${_action} ".mpv2"
338 !insertmacro ${_action} ".mts"
339 !insertmacro ${_action} ".mtv"
340 !insertmacro ${_action} ".mxf"
341 !insertmacro ${_action} ".nsv"
342 !insertmacro ${_action} ".nuv"
343 !insertmacro ${_action} ".ogg"
344 !insertmacro ${_action} ".ogm"
345 !insertmacro ${_action} ".ogx"
346 !insertmacro ${_action} ".ogv"
347 !insertmacro ${_action} ".rec"
348 !insertmacro ${_action} ".rm"
349 !insertmacro ${_action} ".rmvb"
350 !insertmacro ${_action} ".tod"
351 !insertmacro ${_action} ".ts"
352 !insertmacro ${_action} ".tts"
353 !insertmacro ${_action} ".vob"
354 !insertmacro ${_action} ".vro"
355 !insertmacro ${_action} ".webm"
356 !insertmacro ${_action} ".wmv"
359 !macro MacroOtherExtensions _action
360 !insertmacro ${_action} ".asx"
361 !insertmacro ${_action} ".b4s"
362 !insertmacro ${_action} ".bin"
363 !insertmacro ${_action} ".cue"
364 !insertmacro ${_action} ".ifo"
365 !insertmacro ${_action} ".m3u"
366 !insertmacro ${_action} ".m3u8"
367 !insertmacro ${_action} ".pls"
368 !insertmacro ${_action} ".ram"
369 !insertmacro ${_action} ".sdp"
370 !insertmacro ${_action} ".vlc"
371 !insertmacro ${_action} ".xspf"
374 !macro MacroSkinExtensions _action
375 !insertmacro ${_action} ".vlt"
376 !insertmacro ${_action} ".wsz"
379 ; One macro to rule them all
380 !macro MacroAllExtensions _action
381 !insertmacro MacroAudioExtensions ${_action}
382 !insertmacro MacroVideoExtensions ${_action}
383 !insertmacro MacroOtherExtensions ${_action}
386 ;;;;;;;;;;;;;;;;;;;;;;;;;;;
387 ; 2. Context menu entries ;
388 ;;;;;;;;;;;;;;;;;;;;;;;;;;;
390 ; Generic function for adding the context menu for one ext.
391 !macro AddContextMenuExt EXT
392 WriteRegStr HKCR ${EXT}\shell\PlayWithVLC "" $ContextMenuEntry_PlayWith
393 WriteRegStr HKCR ${EXT}\shell\PlayWithVLC\command "" '"$INSTDIR\vlc.exe" --started-from-file --no-playlist-enqueue "%1"'
395 WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC "" $ContextMenuEntry_AddToPlaylist
396 WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC\command "" '"$INSTDIR\vlc.exe" --started-from-file --playlist-enqueue "%1"'
399 !macro AddContextMenu EXT
401 ReadRegStr $R0 HKCR ${EXT} ""
402 !insertmacro AddContextMenuExt $R0
406 !macro DeleteContextMenuExt EXT
407 DeleteRegKey HKCR ${EXT}\shell\PlayWithVLC
408 DeleteRegKey HKCR ${EXT}\shell\AddToPlaylistVLC
411 !macro DeleteContextMenu EXT
413 ReadRegStr $R0 HKCR ${EXT} ""
414 !insertmacro DeleteContextMenuExt $R0
418 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
420 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
424 !define Index 'Line${__LINE__}'
427 ; this will loop through all the logged users and "virtual" windows users
428 ; (it looks like users are only present in HKEY_USERS when they are logged in)
430 EnumRegKey $1 HKU "" $0
431 StrCmp $1 "" "${Index}-End"
433 ReadRegStr $2 HKU "$1\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" AppData
434 StrCmp $2 "" "${Index}-Loop"
445 !macro OpenUninstallLog
446 FileOpen $UninstallLog "$INSTDIR\uninstall.log" a
447 FileSeek $UninstallLog 0 END
450 !macro CloseUninstallLog
451 FileClose $UninstallLog
452 SetFileAttributes "$INSTDIR\uninstall.log" HIDDEN
458 !macro InstallFile FILEREGEX
460 !define Index 'Line${__LINE__}'
461 FindFirst $0 $1 "$INSTDIR\${FILEREGEX}"
462 StrCmp $0 "" "${Index}-End"
464 StrCmp $1 "" "${Index}-End"
465 FileWrite $UninstallLog "$1$\r$\n"
472 !macro InstallFolder FOLDER
475 Call InstallFolderInternal
478 Function InstallFolderInternal
480 !define Index 'Line${__LINE__}'
481 FindFirst $0 $1 "$INSTDIR\$9\*"
482 StrCmp $0 "" "${Index}-End"
484 StrCmp $1 "" "${Index}-End"
485 StrCmp $1 "." "${Index}-Next"
486 StrCmp $1 ".." "${Index}-Next"
487 IfFileExists "$9\$1\*" 0 "${Index}-Write"
491 Call InstallFolderInternal
496 FileWrite $UninstallLog "$9\$1$\r$\n"
506 ;;;;;;;;;;;;;;;;;;;;;;
507 ; Installer sections ;
510 ;;;;;;;;;;;;;;;;;;;;;;
512 Section $Name_Section01 SEC01
514 SetShellVarContext all
515 SetOutPath "$INSTDIR"
517 !insertmacro OpenUninstallLog
519 ; VLC.exe, libvlc.dll
520 !insertmacro InstallFile vlc.exe
521 !insertmacro InstallFile vlc.exe.manifest
522 !insertmacro InstallFile vlc-cache-gen.exe
525 !insertmacro InstallFile *.dll
528 !insertmacro InstallFile *.txt
531 !insertmacro InstallFolder plugins
532 !insertmacro InstallFolder locale
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 /o $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
777 StrCmp 1223 $0 UAC_ElevationAborted
778 StrCmp 0 $0 0 UAC_Err
779 StrCmp 1 $1 0 UAC_Success
783 MessageBox mb_iconstop "Unable to elevate, error $0"
786 UAC_ElevationAborted:
787 MessageBox mb_iconstop "This installer requires admin access, aborting!"
792 StrCmp 3 $1 0 UAC_ElevationAborted
793 MessageBox mb_iconstop "This installer requires admin access, try again"
795 !insertmacro MUI_LANGDLL_DISPLAY
797 !include "languages\english.nsh"
798 StrCmp $LANGUAGE ${LANG_FRENCH} French 0
799 StrCmp $LANGUAGE ${LANG_GERMAN} German 0
800 StrCmp $LANGUAGE ${LANG_ITALIAN} Italian 0
801 StrCmp $LANGUAGE ${LANG_HUNGARIAN} Hungarian 0
802 StrCmp $LANGUAGE ${LANG_ROMANIAN} Romanian 0
803 StrCmp $LANGUAGE ${LANG_CATALAN} Catalan 0
804 StrCmp $LANGUAGE ${LANG_BULGARIAN} Bulgarian 0
805 StrCmp $LANGUAGE ${LANG_SLOVAK} Slovak 0
806 StrCmp $LANGUAGE ${LANG_POLISH} Polish 0
807 StrCmp $LANGUAGE ${LANG_DUTCH} Dutch 0
808 StrCmp $LANGUAGE ${LANG_DANISH} Danish 0
809 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} SChinese 0
810 StrCmp $LANGUAGE ${LANG_FINNISH} Finnish 0
811 StrCmp $LANGUAGE ${LANG_JAPANESE} Japanese 0
812 ; StrCmp $LANGUAGE ${LANG_BENGALI} Bengali 0
813 ; StrCmp $LANGUAGE ${LANG_PUNJABI} Punjabi 0
814 ; StrCmp $LANGUAGE ${LANG_SLOVENIAN} Slovenian 0
815 StrCmp $LANGUAGE ${LANG_SPANISH} Spanish 0
816 StrCmp $LANGUAGE ${LANG_ESTONIAN} Estonian 0
817 StrCmp $LANGUAGE ${LANG_LITHUANIAN} Lithuanian 0
818 StrCmp $LANGUAGE ${LANG_BASQUE} Basque 0
819 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} Brazilian EndLanguageCmp
821 !include "languages\french.nsh"
824 !include "languages\german.nsh"
827 !include "languages\italian.nsh"
830 !include "languages\hungarian.nsh"
833 !include "languages\romanian.nsh"
836 !include "languages\catalan.nsh"
839 !include "languages\bulgarian.nsh"
842 !include "languages\slovak.nsh"
845 !include "languages\polish.nsh"
848 !include "languages\dutch.nsh"
851 !include "languages\danish.nsh"
854 !include "languages\schinese.nsh"
857 !include "languages\finnish.nsh"
860 !include "languages\japanese.nsh"
863 !include "languages\bengali.nsh"
866 !include "languages\punjabi.nsh"
869 !include "languages\slovenian.nsh"
872 !include "languages\spanish.nsh"
875 !include "languages\estonian.nsh"
878 !include "languages\lithuanian.nsh"
881 !include "languages\basque.nsh"
884 !include "languages\brazilian_portuguese.nsh"
887 ReadRegStr $R0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
891 MessageBox MB_YESNO|MB_ICONEXCLAMATION $Message_AlreadyInstalled /SD IDNO IDNO done
896 ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
901 Function .OnInstFailed
905 Function .OnInstSuccess
911 WriteUninstaller "$INSTDIR\uninstall.exe"
912 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "InstallDir" $INSTDIR
913 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "Version" "${VERSION}"
914 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\vlc.exe"
916 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
917 "DisplayName" "$(^Name)"
918 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
919 "UninstallString" "$INSTDIR\uninstall.exe"
920 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
921 "InstallLocation" "$INSTDIR"
922 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
923 "DisplayIcon" "$INSTDIR\vlc.exe"
924 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
925 "DisplayVersion" "${PRODUCT_VERSION}"
926 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
927 "URLInfoAbout" "${PRODUCT_WEB_SITE}"
928 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
929 "Publisher" "${PRODUCT_PUBLISHER}"
930 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
931 "VersionMajor" "@VERSION_MAJOR@"
932 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
933 "VersionMinor" "@VERSION_MINOR@"
936 ;;;;;;;;;;;;;;;;;;;;;;;;
937 ; Uninstaller sections ;
938 ;;;;;;;;;;;;;;;;;;;;;;;;
940 ; TrimNewlines (copied from NSIS documentation)
941 ; input, top of stack (e.g. whatever$\r$\n)
942 ; output, top of stack (replaces, with e.g. whatever)
943 ; modifies no other variables.
945 Function un.TrimNewlines
954 StrCmp $R2 "$\r" loop
955 StrCmp $R2 "$\n" loop
957 IntCmp $R1 0 no_trim_needed
966 Function un.RemoveEmptyDirs
968 !define Index 'Line${__LINE__}'
969 FindFirst $0 $1 "$INSTDIR$9*"
970 StrCmp $0 "" "${Index}-End"
972 StrCmp $1 "" "${Index}-End"
973 StrCmp $1 "." "${Index}-Next"
974 StrCmp $1 ".." "${Index}-Next"
979 Call un.RemoveEmptyDirs
993 Section "un.$Name_Section91" SEC91
995 SetShellVarContext all
997 !insertmacro MacroAllExtensions DeleteContextMenu
998 !insertmacro MacroAllExtensions UnRegisterExtensionSection
999 !insertmacro MacroSkinExtensions UnRegisterExtensionSection
1000 !insertmacro DeleteContextMenuExt "Directory"
1002 ;remove activex plugin
1003 UnRegDLL "$INSTDIR\axvlc.dll"
1004 Delete /REBOOTOK "$INSTDIR\axvlc.dll"
1005 Delete /REBOOTOK "$INSTDIR\axvlc.dll.manifest"
1007 ;remove mozilla plugin
1012 !define Index 'Line${__LINE__}'
1018 EnumRegKey $R0 HKLM "SOFTWARE\Mozilla" "$R1"
1019 StrCmp $R0 "" "${Index}-End"
1021 ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins"
1022 StrCmp $R2 "" "${Index}-Loop" ""
1024 ; old files (0.8.5 and before) that may be lying around
1025 Delete /REBOOTOK "$R2\npvlc.dll"
1026 Delete /REBOOTOK "$R2\libvlc.dll"
1027 Delete /REBOOTOK "$R2\vlcintf.xpt"
1028 Goto "${Index}-Loop"
1032 Delete /REBOOTOK "$INSTDIR\npvlc.dll"
1033 Delete /REBOOTOK "$INSTDIR\npvlc.dll.manifest"
1035 RMDir "$SMPROGRAMS\VideoLAN"
1036 RMDir /r $SMPROGRAMS\VideoLAN
1038 FileOpen $UninstallLog "$INSTDIR\uninstall.log" r
1041 FileRead $UninstallLog $R0
1042 IfErrors UninstallEnd
1044 Call un.TrimNewLines
1046 Delete "$INSTDIR\$R0"
1049 FileClose $UninstallLog
1050 Delete "$INSTDIR\uninstall.log"
1051 Delete "$INSTDIR\uninstall.exe"
1053 Call un.RemoveEmptyDirs
1056 DeleteRegKey HKLM Software\VideoLAN
1058 DeleteRegKey HKCR Applications\vlc.exe
1059 DeleteRegKey HKCR AudioCD\shell\PlayWithVLC
1060 DeleteRegKey HKCR DVD\shell\PlayWithVLC
1061 DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival"
1062 DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival
1063 DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival"
1064 DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival
1065 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoCDMovieOnArrival" "VLCPlayVCDMovieOnArrival"
1066 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival
1067 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlaySuperVideoCDMovieOnArrival" "VLCPlaySVCDMovieOnArrival"
1068 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival
1069 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDAudioOnArrival" "VLCPlayDVDAudioOnArrival"
1070 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival
1071 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoFilesOnArrival" "VLCPlayVideoFilesOnArrival"
1072 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival
1073 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayMusicFilesOnArrival" "VLCPlayMusicFilesOnArrival"
1074 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival
1076 DeleteRegKey HKLM Software\Clients\Media\VLC
1077 DeleteRegValue HKLM "Software\RegisteredApplications" "VLC"
1078 DeleteRegKey HKCR "VLC.MediaFile"
1079 DeleteRegKey HKCR "VLC.DVDMovie"
1080 DeleteRegKey HKCR "VLC.CDAudio"
1081 DeleteRegKey HKCR "VLC.VCDMovie"
1082 DeleteRegKey HKCR "VLC.SVCDMovie"
1083 DeleteRegKey HKCR "VLC.OPENFolder"
1087 "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}"
1090 "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
1092 Delete "$DESKTOP\VLC media player.lnk"
1094 DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
1095 DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
1099 Section /o "un.$Name_Section92" SEC92
1100 !insertmacro delprefs
1103 ; Uninstaller section descriptions
1104 !insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
1105 !insertmacro MUI_DESCRIPTION_TEXT ${SEC91} $Desc_Section91
1106 !insertmacro MUI_DESCRIPTION_TEXT ${SEC92} $Desc_Section92
1107 !insertmacro MUI_UNFUNCTION_DESCRIPTION_END
1109 Function un.OnUnInstFailed
1113 Function un.OnUnInstSuccess
1115 Delete "$INSTDIR\UAC.dll"
1122 StrCmp 1223 $0 UAC_ElevationAborted
1123 StrCmp 0 $0 0 UAC_Err
1124 StrCmp 1 $1 0 UAC_Success
1128 MessageBox mb_iconstop "Unable to elevate, error $0"
1131 UAC_ElevationAborted:
1132 MessageBox mb_iconstop "This installer requires admin access, aborting!"
1137 StrCmp 3 $1 0 UAC_ElevationAborted
1138 MessageBox mb_iconstop "This installer requires admin access, try again"
1141 !insertmacro MUI_UNGETLANGUAGE
1143 !include "languages\english.nsh"
1144 StrCmp $LANGUAGE ${LANG_FRENCH} French 0
1145 StrCmp $LANGUAGE ${LANG_GERMAN} German 0
1146 StrCmp $LANGUAGE ${LANG_ITALIAN} Italian 0
1147 StrCmp $LANGUAGE ${LANG_HUNGARIAN} Hungarian 0
1148 StrCmp $LANGUAGE ${LANG_ROMANIAN} Romanian 0
1149 StrCmp $LANGUAGE ${LANG_CATALAN} Catalan 0
1150 StrCmp $LANGUAGE ${LANG_BULGARIAN} Bulgarian 0
1151 StrCmp $LANGUAGE ${LANG_SLOVAK} Slovak 0
1152 StrCmp $LANGUAGE ${LANG_POLISH} Polish 0
1153 StrCmp $LANGUAGE ${LANG_DUTCH} Dutch 0
1154 StrCmp $LANGUAGE ${LANG_DANISH} Danish 0
1155 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} SChinese 0
1156 StrCmp $LANGUAGE ${LANG_FINNISH} Finnish 0
1157 StrCmp $LANGUAGE ${LANG_JAPANESE} Japanese 0
1158 ; StrCmp $LANGUAGE ${LANG_BENGALI} Bengali 0
1159 ; StrCmp $LANGUAGE ${LANG_PUNJABI} Punjabi 0
1160 ; StrCmp $LANGUAGE ${LANG_SLOVENIAN} Slovenian 0
1161 StrCmp $LANGUAGE ${LANG_SPANISH} Spanish 0
1162 StrCmp $LANGUAGE ${LANG_ESTONIAN} Estonian 0
1163 StrCmp $LANGUAGE ${LANG_LITHUANIAN} Lithuanian 0
1164 StrCmp $LANGUAGE ${LANG_BASQUE} Basque 0
1165 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} Brazilian EndLanguageCmp
1167 !include "languages\french.nsh"
1170 !include "languages\german.nsh"
1173 !include "languages\italian.nsh"
1176 !include "languages\hungarian.nsh"
1179 !include "languages\romanian.nsh"
1182 !include "languages\catalan.nsh"
1185 !include "languages\bulgarian.nsh"
1188 !include "languages\slovak.nsh"
1191 !include "languages\polish.nsh"
1194 !include "languages\dutch.nsh"
1197 !include "languages\danish.nsh"
1200 !include "languages\schinese.nsh"
1203 !include "languages\finnish.nsh"
1206 !include "languages\japanese.nsh"
1209 !include "languages\bengali.nsh"
1212 !include "languages\punjabi.nsh"
1215 !include "languages\slovenian.nsh"
1218 !include "languages\spanish.nsh"
1221 !include "languages\estonian.nsh"
1224 !include "languages\lithuanian.nsh"
1227 !include "languages\basque.nsh"
1230 !include "languages\brazilian_portuguese.nsh"