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 @BUILD_ACTIVEX_TRUE@ !define INSTALL_ACTIVEX
24 @BUILD_MOZILLA_TRUE@ !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 !insertmacro MUI_PAGE_LICENSE "COPYING.txt"
77 !insertmacro MUI_PAGE_COMPONENTS
79 !insertmacro MUI_PAGE_DIRECTORY
81 !insertmacro MUI_PAGE_INSTFILES
85 Exec '$INSTDIR\vlc.exe'
89 !insertmacro UAC.CallFunctionAsUser ExecAppFile
92 !define MUI_FINISHPAGE_RUN
93 !define MUI_FINISHPAGE_RUN_FUNCTION AppRunAs
94 !define MUI_FINISHPAGE_LINK $Link_VisitWebsite
95 !define MUI_FINISHPAGE_LINK_LOCATION "http://www.videolan.org/vlc/"
96 !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt"
97 !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
98 !define MUI_FINISHPAGE_NOREBOOTSUPPORT
99 !insertmacro MUI_PAGE_FINISH
102 !insertmacro MUI_UNPAGE_CONFIRM
103 !insertmacro MUI_UNPAGE_COMPONENTS
104 !insertmacro MUI_UNPAGE_INSTFILES
105 !insertmacro MUI_UNPAGE_FINISH
108 !insertmacro MUI_LANGUAGE "English" # first language is the default language
109 !insertmacro MUI_LANGUAGE "French"
110 !insertmacro MUI_LANGUAGE "German"
111 !insertmacro MUI_LANGUAGE "Spanish"
112 !insertmacro MUI_LANGUAGE "SimpChinese"
113 !insertmacro MUI_LANGUAGE "TradChinese"
114 !insertmacro MUI_LANGUAGE "Japanese"
115 !insertmacro MUI_LANGUAGE "Korean"
116 !insertmacro MUI_LANGUAGE "Italian"
117 !insertmacro MUI_LANGUAGE "Dutch"
118 !insertmacro MUI_LANGUAGE "Danish"
119 !insertmacro MUI_LANGUAGE "Swedish"
120 !insertmacro MUI_LANGUAGE "Norwegian"
121 !insertmacro MUI_LANGUAGE "Finnish"
122 !insertmacro MUI_LANGUAGE "Greek"
123 !insertmacro MUI_LANGUAGE "Russian"
124 !insertmacro MUI_LANGUAGE "Portuguese"
125 !insertmacro MUI_LANGUAGE "PortugueseBR"
126 !insertmacro MUI_LANGUAGE "Arabic"
127 !insertmacro MUI_LANGUAGE "Polish"
128 !insertmacro MUI_LANGUAGE "Romanian"
129 !insertmacro MUI_LANGUAGE "Slovak"
130 !insertmacro MUI_LANGUAGE "Czech"
131 !insertmacro MUI_LANGUAGE "Hungarian"
132 !insertmacro MUI_LANGUAGE "Catalan"
133 !insertmacro MUI_LANGUAGE "Bulgarian"
134 !insertmacro MUI_LANGUAGE "Estonian"
135 !insertmacro MUI_LANGUAGE "Lithuanian"
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\command" "" '"$INSTDIR\vlc.exe" --started-from-file "%1"'
165 WriteRegStr HKCR "VLC$R0\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
168 ; Vista and above detection
169 ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
171 StrCmp $R2 '6' ForVista ToEnd
173 WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities\FileAssociations" "$R0" "VLC$R0"
178 ;; Function that registers one skin extension for VLC
179 Function RegisterSkinExtension
180 ; back up old value for extension $R0 (eg. ".opt")
181 ReadRegStr $1 HKCR "$R0" ""
182 StrCmp $1 "" NoBackup
183 StrCmp $1 "VLC$R0" "NoBackup"
184 WriteRegStr HKCR "$R0" "VLC.backup" $1
186 WriteRegStr HKCR "$R0" "" "VLC$R0"
187 ReadRegStr $0 HKCR "VLC$R0" ""
188 WriteRegStr HKCR "VLC$R0" "" "VLC skin file ($R0)"
189 WriteRegStr HKCR "VLC$R0\shell" "" "Open"
190 WriteRegStr HKCR "VLC$R0\shell\Open" "" ""
191 WriteRegStr HKCR "VLC$R0\shell\Open\command" "" '"$INSTDIR\vlc.exe" -Iskins --skins2-last "%1"'
192 WriteRegStr HKCR "VLC$R0\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
195 ; Vista and above detection
196 ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
198 StrCmp $R2 '6' ForVista ToEnd
200 WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities\FileAssociations" "$R0" "VLC$R0"
205 ;; Function that removes one extension that VLC owns.
206 Function un.RegisterExtension
207 ;start of restore script
208 ReadRegStr $1 HKCR "$R0" ""
209 StrCmp $1 "VLC$R0" 0 NoOwn ; only do this if we own it
210 ; Read the old value from Backup
211 ReadRegStr $1 HKCR "$R0" "VLC.backup"
212 StrCmp $1 "" 0 Restore ; if backup="" then delete the whole key
213 DeleteRegKey HKCR "$R0"
216 WriteRegStr HKCR "$R0" "" $1
217 DeleteRegValue HKCR "$R0" "VLC.backup"
219 DeleteRegKey HKCR "VLC$R0" ;Delete key with association settings
220 DeleteRegKey HKLM "Software\Clients\Media\VLC\Capabilities\FileAssociations\VLC$R0" ; for vista
223 !macro RegisterExtensionSection EXT
228 Call RegisterExtension
233 !macro RegisterSkinExtensionSection EXT
238 Call RegisterSkinExtension
243 !macro UnRegisterExtensionSection EXT
246 Call un.RegisterExtension
250 !macro WriteRegStrSupportedTypes EXT
251 WriteRegStr HKCR Applications\vlc.exe\SupportedTypes ${EXT} ""
254 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
255 ; Extension lists Macros ;
256 ; Those macros calls the previous functions ;
257 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
259 !macro MacroAudioExtensions _action
260 !insertmacro ${_action} ".a52"
261 !insertmacro ${_action} ".aac"
262 !insertmacro ${_action} ".ac3"
263 !insertmacro ${_action} ".adt"
264 !insertmacro ${_action} ".adts"
265 !insertmacro ${_action} ".aif"
266 !insertmacro ${_action} ".aifc"
267 !insertmacro ${_action} ".aiff"
268 !insertmacro ${_action} ".au"
269 !insertmacro ${_action} ".amr"
270 !insertmacro ${_action} ".aob"
271 !insertmacro ${_action} ".ape"
272 !insertmacro ${_action} ".cda"
273 !insertmacro ${_action} ".dts"
274 !insertmacro ${_action} ".flac"
275 !insertmacro ${_action} ".it"
276 !insertmacro ${_action} ".m4a"
277 !insertmacro ${_action} ".m4p"
278 !insertmacro ${_action} ".mid"
279 !insertmacro ${_action} ".mka"
280 !insertmacro ${_action} ".mlp"
281 !insertmacro ${_action} ".mod"
282 !insertmacro ${_action} ".mp1"
283 !insertmacro ${_action} ".mp2"
284 !insertmacro ${_action} ".mp3"
285 !insertmacro ${_action} ".mpc"
286 !insertmacro ${_action} ".oma"
287 !insertmacro ${_action} ".oga"
288 !insertmacro ${_action} ".rmi"
289 !insertmacro ${_action} ".snd"
290 !insertmacro ${_action} ".s3m"
291 !insertmacro ${_action} ".spx"
292 !insertmacro ${_action} ".tta"
293 !insertmacro ${_action} ".voc"
294 !insertmacro ${_action} ".vqf"
295 !insertmacro ${_action} ".w64"
296 !insertmacro ${_action} ".wav"
297 !insertmacro ${_action} ".wma"
298 !insertmacro ${_action} ".wv"
299 !insertmacro ${_action} ".xa"
300 !insertmacro ${_action} ".xm"
303 !macro MacroVideoExtensions _action
304 !insertmacro ${_action} ".3g2"
305 !insertmacro ${_action} ".3gp"
306 !insertmacro ${_action} ".3gp2"
307 !insertmacro ${_action} ".3gpp"
308 !insertmacro ${_action} ".amv"
309 !insertmacro ${_action} ".asf"
310 !insertmacro ${_action} ".avi"
311 !insertmacro ${_action} ".divx"
312 !insertmacro ${_action} ".dv"
313 !insertmacro ${_action} ".flv"
314 !insertmacro ${_action} ".gxf"
315 !insertmacro ${_action} ".m1v"
316 !insertmacro ${_action} ".m2t"
317 !insertmacro ${_action} ".m2v"
318 !insertmacro ${_action} ".m2ts"
319 !insertmacro ${_action} ".m4v"
320 !insertmacro ${_action} ".mkv"
321 !insertmacro ${_action} ".mov"
322 !insertmacro ${_action} ".mp2"
323 !insertmacro ${_action} ".mp2v"
324 !insertmacro ${_action} ".mp4"
325 !insertmacro ${_action} ".mp4v"
326 !insertmacro ${_action} ".mpa"
327 !insertmacro ${_action} ".mpe"
328 !insertmacro ${_action} ".mpeg"
329 !insertmacro ${_action} ".mpeg1"
330 !insertmacro ${_action} ".mpeg2"
331 !insertmacro ${_action} ".mpeg4"
332 !insertmacro ${_action} ".mpg"
333 !insertmacro ${_action} ".mpv2"
334 !insertmacro ${_action} ".mts"
335 !insertmacro ${_action} ".mxf"
336 !insertmacro ${_action} ".nsv"
337 !insertmacro ${_action} ".nuv"
338 !insertmacro ${_action} ".ogg"
339 !insertmacro ${_action} ".ogm"
340 !insertmacro ${_action} ".ogx"
341 !insertmacro ${_action} ".ogv"
342 !insertmacro ${_action} ".ps"
343 !insertmacro ${_action} ".rec"
344 !insertmacro ${_action} ".rm"
345 !insertmacro ${_action} ".rmvb"
346 !insertmacro ${_action} ".tod"
347 !insertmacro ${_action} ".ts"
348 !insertmacro ${_action} ".tts"
349 !insertmacro ${_action} ".vob"
350 !insertmacro ${_action} ".vro"
351 !insertmacro ${_action} ".webm"
352 !insertmacro ${_action} ".wmv"
355 !macro MacroOtherExtensions _action
356 !insertmacro ${_action} ".asx"
357 !insertmacro ${_action} ".b4s"
358 !insertmacro ${_action} ".bin"
359 !insertmacro ${_action} ".cue"
360 !insertmacro ${_action} ".ifo"
361 !insertmacro ${_action} ".m3u"
362 !insertmacro ${_action} ".m3u8"
363 !insertmacro ${_action} ".pls"
364 !insertmacro ${_action} ".ram"
365 !insertmacro ${_action} ".sdp"
366 !insertmacro ${_action} ".vlc"
367 !insertmacro ${_action} ".xspf"
370 !macro MacroSkinExtensions _action
371 !insertmacro ${_action} ".vlt"
372 !insertmacro ${_action} ".wsz"
375 ; One macro to rule them all
376 !macro MacroAllExtensions _action
377 !insertmacro MacroAudioExtensions ${_action}
378 !insertmacro MacroVideoExtensions ${_action}
379 !insertmacro MacroOtherExtensions ${_action}
382 ;;;;;;;;;;;;;;;;;;;;;;;;;;;
383 ; 2. Context menu entries ;
384 ;;;;;;;;;;;;;;;;;;;;;;;;;;;
386 ; Generic function for adding the context menu for one ext.
387 !macro AddContextMenuExt EXT
388 WriteRegStr HKCR ${EXT}\shell\PlayWithVLC "" $ContextMenuEntry_PlayWith
389 WriteRegStr HKCR ${EXT}\shell\PlayWithVLC\command "" '"$INSTDIR\vlc.exe" --started-from-file --no-playlist-enqueue "%1"'
391 WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC "" $ContextMenuEntry_AddToPlaylist
392 WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC\command "" '"$INSTDIR\vlc.exe" --started-from-file --playlist-enqueue "%1"'
395 !macro AddContextMenu EXT
397 ReadRegStr $R0 HKCR ${EXT} ""
398 !insertmacro AddContextMenuExt $R0
402 !macro DeleteContextMenuExt EXT
403 DeleteRegKey HKCR ${EXT}\shell\PlayWithVLC
404 DeleteRegKey HKCR ${EXT}\shell\AddToPlaylistVLC
407 !macro DeleteContextMenu EXT
409 ReadRegStr $R0 HKCR ${EXT} ""
410 !insertmacro DeleteContextMenuExt $R0
414 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
416 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
420 !define Index 'Line${__LINE__}'
423 ; this will loop through all the logged users and "virtual" windows users
424 ; (it looks like users are only present in HKEY_USERS when they are logged in)
426 EnumRegKey $1 HKU "" $0
427 StrCmp $1 "" "${Index}-End"
429 ReadRegStr $2 HKU "$1\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" AppData
430 StrCmp $2 "" "${Index}-Loop"
441 !macro OpenUninstallLog
442 FileOpen $UninstallLog "$INSTDIR\uninstall.log" a
443 FileSeek $UninstallLog 0 END
446 !macro CloseUninstallLog
447 FileClose $UninstallLog
448 SetFileAttributes "$INSTDIR\uninstall.log" HIDDEN
454 !macro InstallFile FILEREGEX
456 !define Index 'Line${__LINE__}'
457 FindFirst $0 $1 "$INSTDIR\${FILEREGEX}"
458 StrCmp $0 "" "${Index}-End"
460 StrCmp $1 "" "${Index}-End"
461 FileWrite $UninstallLog "$1$\r$\n"
468 !macro InstallFolder FOLDER
471 Call InstallFolderInternal
474 Function InstallFolderInternal
476 !define Index 'Line${__LINE__}'
477 FindFirst $0 $1 "$INSTDIR\$9\*"
478 StrCmp $0 "" "${Index}-End"
480 StrCmp $1 "" "${Index}-End"
481 StrCmp $1 "." "${Index}-Next"
482 StrCmp $1 ".." "${Index}-Next"
483 IfFileExists "$9\$1\*" 0 "${Index}-Write"
487 Call InstallFolderInternal
492 FileWrite $UninstallLog "$9\$1$\r$\n"
502 ;;;;;;;;;;;;;;;;;;;;;;
503 ; Installer sections ;
506 ;;;;;;;;;;;;;;;;;;;;;;
508 Section $Name_Section01 SEC01
510 SetShellVarContext all
511 SetOutPath "$INSTDIR"
513 !insertmacro OpenUninstallLog
515 ; VLC.exe, libvlc.dll
516 !insertmacro InstallFile vlc.exe
517 !insertmacro InstallFile vlc.exe.manifest
518 !insertmacro InstallFile vlc-cache-gen.exe
521 !insertmacro InstallFile *.dll
524 !insertmacro InstallFile *.txt
527 !insertmacro InstallFolder plugins
528 !insertmacro InstallFolder locale
529 @BUILD_OSDMENU_TRUE@ !insertmacro InstallFolder osdmenu
530 @BUILD_SKINS_TRUE@ !insertmacro InstallFolder skins
531 @BUILD_HTTPD_TRUE@ !insertmacro InstallFolder http
532 @BUILD_LUA_TRUE@ !insertmacro InstallFolder lua
534 ; Generate the cache and add it to uninstall.log
535 ExecWait "$INSTDIR\vlc-cache-gen.exe $INSTDIR\plugins"
536 FindFirst $0 $1 "$INSTDIR\plugins\*.dat"
537 FileWrite $UninstallLog "plugins\$1$\r$\n"
543 WriteIniStr "$INSTDIR\${PRODUCT_GROUP} Website.url" "InternetShortcut" "URL" \
544 "${PRODUCT_WEB_SITE}"
545 FileWrite $UninstallLog "${PRODUCT_GROUP} Website.url$\r$\n"
546 WriteIniStr "$INSTDIR\Documentation.url" "InternetShortcut" "URL" \
547 "${PRODUCT_WEB_SITE}/doc/"
548 FileWrite $UninstallLog "Documentation.url$\r$\n"
549 WriteIniStr "$INSTDIR\New_Skins.url" "InternetShortcut" "URL" \
550 "${PRODUCT_WEB_SITE}/vlc/skins.php"
551 FileWrite $UninstallLog "New_Skins.url$\r$\n"
553 !insertmacro CloseUninstallLog
555 ; Add VLC to "recommended programs" for the following extensions
556 WriteRegStr HKCR Applications\vlc.exe "" ""
557 WriteRegStr HKCR Applications\vlc.exe "FriendlyAppName" "VLC media player"
558 WriteRegStr HKCR Applications\vlc.exe\shell\Open "" $ContextMenuEntry_PlayWith
559 WriteRegStr HKCR Applications\vlc.exe\shell\Open\command "" \
560 '"$INSTDIR\vlc.exe" --started-from-file "%1"'
561 !insertmacro MacroAllExtensions WriteRegStrSupportedTypes
563 ; Windows default programs Registration
564 ; Vista and above detection
565 ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
567 StrCmp $R1 '6' lbl_vista lbl_done
570 WriteRegStr HKLM "Software\RegisteredApplications" "VLC" "Software\Clients\Media\VLC\Capabilities"
571 WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationName" "VLC media player"
572 WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationDescription" "VLC - The video swiss knife"
573 WriteRegStr HKLM "Software\Clients\Media\VLC" "" "VLC media player"
574 WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "HideIconsCommand" "$\"$INSTDIR\spad-setup.exe$\" /HideIcons /S"
575 WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "ShowIconsCommand" "$\"$INSTDIR\spad-setup.exe$\" /ShowIcons /S"
576 WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "ReinstallCommand" "$\"$INSTDIR\spad-setup.exe$\" /Reinstall /S"
577 WriteRegDWORD HKLM "Software\Clients\Media\VLC\InstallInfo" "IconsVisible" 0x001
582 Section $Name_Section02a SEC02a
584 CreateDirectory "$SMPROGRAMS\VideoLAN"
585 CreateShortCut "$SMPROGRAMS\VideoLAN\Reset VLC media player preferences and cache files.lnk" \
586 "$INSTDIR\vlc.exe" "--reset-config --reset-plugins-cache vlc://quit"
587 CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player.lnk" \
588 "$INSTDIR\vlc.exe" ""
589 CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player skinned.lnk" \
590 "$INSTDIR\vlc.exe" "-Iskins"
591 CreateShortCut "$SMPROGRAMS\VideoLAN\Documentation.lnk" \
592 "$INSTDIR\Documentation.url"
593 CreateShortCut "$SMPROGRAMS\VideoLAN\Release Notes.lnk" \
594 "$INSTDIR\NEWS.txt" ""
595 CreateShortCut "$SMPROGRAMS\VideoLAN\${PRODUCT_GROUP} Website.lnk" \
596 "$INSTDIR\${PRODUCT_GROUP} Website.url"
599 Section $Name_Section02b SEC02b
601 CreateShortCut "$DESKTOP\VLC media player.lnk" \
602 "$INSTDIR\vlc.exe" ""
605 !ifdef INSTALL_MOZILLA
606 Section /o $Name_Section03 SEC03
609 SetOutPath "$INSTDIR"
610 !insertmacro OpenUninstallLog
611 !insertmacro InstallFile mozilla\npvlc.dll
612 !insertmacro InstallFile mozilla\npvlc.dll.manifest
613 !insertmacro CloseUninstallLog
615 !define Moz "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}"
616 WriteRegStr HKLM ${Moz} "Description" "VLC Multimedia Plugin"
617 WriteRegStr HKLM ${Moz} "Path" "$INSTDIR\npvlc.dll"
618 WriteRegStr HKLM ${Moz} "Product" "VLC media player"
619 WriteRegStr HKLM ${Moz} "Vendor" "VideoLAN"
620 WriteRegStr HKLM ${Moz} "Version" "${VERSION}"
624 !ifdef INSTALL_ACTIVEX
625 Section $Name_Section04 SEC04
628 SetOutPath "$INSTDIR"
629 !insertmacro OpenUninstallLog
630 !insertmacro InstallFile activex\axvlc.dll
631 !insertmacro InstallFile activex\axvlc.dll.manifest
632 !insertmacro CloseUninstallLog
633 RegDLL "$INSTDIR\axvlc.dll"
638 Section $Name_Section05 SEC05
640 WriteRegStr HKCR "AudioCD\shell\PlayWithVLC" "" $ContextMenuEntry_PlayWith
641 WriteRegStr HKCR "AudioCD\shell\PlayWithVLC\command" "" \
642 '"$INSTDIR\vlc.exe" --started-from-file cdda://%1'
643 WriteRegStr HKCR "DVD\shell\PlayWithVLC" "" $ContextMenuEntry_PlayWith
644 WriteRegStr HKCR "DVD\shell\PlayWithVLC\command" "" \
645 '"$INSTDIR\vlc.exe" --started-from-file dvd://%1'
647 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival" ""
648 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Action" $Action_OnArrivalDVD
649 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
650 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeProgID" "VLC.DVDMovie"
651 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeVerb" "Open"
652 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Provider" "VideoLAN VLC media player"
654 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival" ""
655 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Action" $Action_OnArrivalAudioCD
656 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
657 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeProgID" "VLC.CDAudio"
658 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeVerb" "Open"
659 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Provider" "VideoLAN VLC media player"
661 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoCDMovieOnArrival" "VLCPlayVCDMovieOnArrival" ""
662 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "Action" $Action_OnArrivalVCDMovie
663 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
664 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "InvokeProgID" "VLC.VCDMovie"
665 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "InvokeVerb" "Open"
666 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "Provider" "VideoLAN VLC media player"
668 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlaySuperVideoCDMovieOnArrival" "VLCPlaySVCDMovieOnArrival" ""
669 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "Action" $Action_OnArrivalSVCDMovie
670 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
671 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "InvokeProgID" "VLC.SVCDMovie"
672 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "InvokeVerb" "Open"
673 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "Provider" "VideoLAN VLC media player"
675 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDAudioOnArrival" "VLCPlayDVDAudioOnArrival" ""
676 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "Action" $Action_OnArrivalDVDAudio
677 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
678 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "InvokeProgID" "VLC.OPENFolder"
679 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "InvokeVerb" "Open"
680 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "Provider" "VideoLAN VLC media player"
682 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoFilesOnArrival" "VLCPlayVideoFilesOnArrival" ""
683 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "Action" $Action_OnArrivalVideoFiles
684 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
685 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "InvokeProgID" "VLC.OPENFolder"
686 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "InvokeVerb" "Open"
687 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "Provider" "VideoLAN VLC media player"
689 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayMusicFilesOnArrival" "VLCPlayMusicFilesOnArrival" ""
690 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "Action" $Action_OnArrivalMusicFiles
691 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
692 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "InvokeProgID" "VLC.OPENFolder"
693 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "InvokeVerb" "Open"
694 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "Provider" "VideoLAN VLC media player"
696 WriteRegStr HKCR "VLC.DVDMovie" "" "VLC DVD Movie"
697 WriteRegStr HKCR "VLC.DVDMovie\shell" "" "Open"
698 WriteRegStr HKCR "VLC.DVDMovie\shell\Open\command" "" \
699 '"$INSTDIR\vlc.exe" --started-from-file dvd://%1'
700 WriteRegStr HKCR "VLC.DVDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
702 WriteRegStr HKCR "VLC.CDAudio" "" "VLC CD Audio"
703 WriteRegStr HKCR "VLC.CDAudio\shell" "" "Open"
704 WriteRegStr HKCR "VLC.CDAudio\shell\Open\command" "" \
705 '"$INSTDIR\vlc.exe" --started-from-file cdda://%1'
706 WriteRegStr HKCR "VLC.CDAudio\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
708 WriteRegStr HKCR "VLC.VCDMovie" "" "VLC VCD Movie"
709 WriteRegStr HKCR "VLC.VCDMovie\shell" "" "Open"
710 WriteRegStr HKCR "VLC.VCDMovie\shell\Open\command" "" \
711 '"$INSTDIR\vlc.exe" --started-from-file vcd://%1'
712 WriteRegStr HKCR "VLC.VCDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
714 WriteRegStr HKCR "VLC.SVCDMovie" "" "VLC SVCD Movie"
715 WriteRegStr HKCR "VLC.SVCDMovie\shell" "" "Open"
716 WriteRegStr HKCR "VLC.SVCDMovie\shell\Open\command" "" \
717 '"$INSTDIR\vlc.exe" --started-from-file vcd://%1'
718 WriteRegStr HKCR "VLC.SVCDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
720 WriteRegStr HKCR "VLC.OPENFolder" "" "VLC Play content"
721 WriteRegStr HKCR "VLC.OPENFolder\shell" "" "Open"
722 WriteRegStr HKCR "VLC.OPENFolder\shell\Open\command" "" \
723 '"$INSTDIR\vlc.exe" %1'
724 WriteRegStr HKCR "VLC.OPENFolder\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
729 SectionGroup /e !$Name_Section06 SEC06
730 SectionGroup $Name_SectionGroupAudio
731 !insertmacro MacroAudioExtensions RegisterExtensionSection
733 SectionGroup $Name_SectionGroupVideo
734 !insertmacro MacroVideoExtensions RegisterExtensionSection
736 SectionGroup $Name_SectionGroupOther
737 !insertmacro MacroOtherExtensions RegisterExtensionSection
738 !insertmacro MacroSkinExtensions RegisterSkinExtensionSection
742 Section $Name_Section07 SEC07
744 !insertmacro MacroAllExtensions AddContextMenu
745 !insertmacro AddContextMenuExt "Directory"
748 Section $Name_Section08 SEC08
749 !insertmacro delprefs
752 ; Installer section descriptions
753 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
754 !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} $Desc_Section01
755 !insertmacro MUI_DESCRIPTION_TEXT ${SEC02a} $Desc_Section02a
756 !insertmacro MUI_DESCRIPTION_TEXT ${SEC02b} $Desc_Section02b
757 @BUILD_MOZILLA_TRUE@ !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} $Desc_Section03
758 @BUILD_ACTIVEX_TRUE@ !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} $Desc_Section04
759 !insertmacro MUI_DESCRIPTION_TEXT ${SEC05} $Desc_Section05
760 !insertmacro MUI_DESCRIPTION_TEXT ${SEC06} $Desc_Section06
761 !insertmacro MUI_DESCRIPTION_TEXT ${SEC07} $Desc_Section07
762 !insertmacro MUI_DESCRIPTION_TEXT ${SEC08} $Desc_Section08
763 !insertmacro MUI_FUNCTION_DESCRIPTION_END
770 StrCmp 1223 $0 UAC_ElevationAborted
771 StrCmp 0 $0 0 UAC_Err
772 StrCmp 1 $1 0 UAC_Success
776 MessageBox mb_iconstop "Unable to elevate, error $0"
779 UAC_ElevationAborted:
780 MessageBox mb_iconstop "This installer requires admin access, aborting!"
785 StrCmp 3 $1 0 UAC_ElevationAborted
786 MessageBox mb_iconstop "This installer requires admin access, try again"
788 !insertmacro MUI_LANGDLL_DISPLAY
790 !include "languages\english.nsh"
791 StrCmp $LANGUAGE ${LANG_FRENCH} French 0
792 StrCmp $LANGUAGE ${LANG_GERMAN} German 0
793 StrCmp $LANGUAGE ${LANG_ITALIAN} Italian 0
794 StrCmp $LANGUAGE ${LANG_HUNGARIAN} Hungarian 0
795 StrCmp $LANGUAGE ${LANG_ROMANIAN} Romanian 0
796 StrCmp $LANGUAGE ${LANG_CATALAN} Catalan 0
797 StrCmp $LANGUAGE ${LANG_BULGARIAN} Bulgarian 0
798 StrCmp $LANGUAGE ${LANG_SLOVAK} Slovak 0
799 StrCmp $LANGUAGE ${LANG_POLISH} Polish 0
800 StrCmp $LANGUAGE ${LANG_DUTCH} Dutch 0
801 StrCmp $LANGUAGE ${LANG_DANISH} Danish 0
802 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} SChinese 0
803 StrCmp $LANGUAGE ${LANG_FINNISH} Finnish 0
804 StrCmp $LANGUAGE ${LANG_JAPANESE} Japanese 0
805 ; StrCmp $LANGUAGE ${LANG_BENGALI} Bengali 0
806 ; StrCmp $LANGUAGE ${LANG_PUNJABI} Punjabi 0
807 ; StrCmp $LANGUAGE ${LANG_SLOVENIAN} Slovenian 0
808 StrCmp $LANGUAGE ${LANG_SPANISH} Spanish 0
809 StrCmp $LANGUAGE ${LANG_ESTONIAN} Estonian 0
810 StrCmp $LANGUAGE ${LANG_LITHUANIAN} Lithuanian 0
811 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} Brazilian EndLanguageCmp
813 !include "languages\french.nsh"
816 !include "languages\german.nsh"
819 !include "languages\italian.nsh"
822 !include "languages\hungarian.nsh"
825 !include "languages\romanian.nsh"
828 !include "languages\catalan.nsh"
831 !include "languages\bulgarian.nsh"
834 !include "languages\slovak.nsh"
837 !include "languages\polish.nsh"
840 !include "languages\dutch.nsh"
843 !include "languages\schinese.nsh"
846 !include "languages\finnish.nsh"
849 !include "languages\japanese.nsh"
852 !include "languages\bengali.nsh"
855 !include "languages\punjabi.nsh"
858 !include "languages\slovenian.nsh"
861 !include "languages\spanish.nsh"
864 !include "languages\estonian.nsh"
867 !include "languages\lithuanian.nsh"
870 !include "languages\brazilian_portuguese.nsh"
873 ReadRegStr $R0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
877 MessageBox MB_YESNO|MB_ICONEXCLAMATION $Message_AlreadyInstalled IDNO done
882 ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
887 Function .OnInstFailed
891 Function .OnInstSuccess
897 WriteUninstaller "$INSTDIR\uninstall.exe"
898 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "InstallDir" $INSTDIR
899 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "Version" "${VERSION}"
900 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\vlc.exe"
902 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
903 "DisplayName" "$(^Name)"
904 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
905 "UninstallString" "$INSTDIR\uninstall.exe"
906 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
907 "InstallLocation" "$INSTDIR"
908 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
909 "DisplayIcon" "$INSTDIR\vlc.exe"
910 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
911 "DisplayVersion" "${PRODUCT_VERSION}"
912 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
913 "URLInfoAbout" "${PRODUCT_WEB_SITE}"
914 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
915 "Publisher" "${PRODUCT_PUBLISHER}"
916 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
917 "VersionMajor" "@VERSION_MAJOR@"
918 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
919 "VersionMinor" "@VERSION_MINOR@"
922 ;;;;;;;;;;;;;;;;;;;;;;;;
923 ; Uninstaller sections ;
924 ;;;;;;;;;;;;;;;;;;;;;;;;
926 ; TrimNewlines (copied from NSIS documentation)
927 ; input, top of stack (e.g. whatever$\r$\n)
928 ; output, top of stack (replaces, with e.g. whatever)
929 ; modifies no other variables.
931 Function un.TrimNewlines
940 StrCmp $R2 "$\r" loop
941 StrCmp $R2 "$\n" loop
943 IntCmp $R1 0 no_trim_needed
952 Function un.RemoveEmptyDirs
954 !define Index 'Line${__LINE__}'
955 FindFirst $0 $1 "$INSTDIR$9*"
956 StrCmp $0 "" "${Index}-End"
958 StrCmp $1 "" "${Index}-End"
959 StrCmp $1 "." "${Index}-Next"
960 StrCmp $1 ".." "${Index}-Next"
965 Call un.RemoveEmptyDirs
979 Section "un.$Name_Section91" SEC91
981 SetShellVarContext all
983 !insertmacro MacroAllExtensions DeleteContextMenu
984 !insertmacro MacroAllExtensions UnRegisterExtensionSection
985 !insertmacro MacroSkinExtensions UnRegisterExtensionSection
986 !insertmacro DeleteContextMenuExt "Directory"
988 ;remove activex plugin
989 UnRegDLL "$INSTDIR\axvlc.dll"
990 Delete /REBOOTOK "$INSTDIR\axvlc.dll"
991 Delete /REBOOTOK "$INSTDIR\axvlc.dll.manifest"
993 ;remove mozilla plugin
998 !define Index 'Line${__LINE__}'
1004 EnumRegKey $R0 HKLM "SOFTWARE\Mozilla" "$R1"
1005 StrCmp $R0 "" "${Index}-End"
1007 ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins"
1008 StrCmp $R2 "" "${Index}-Loop" ""
1010 ; old files (0.8.5 and before) that may be lying around
1011 Delete /REBOOTOK "$R2\npvlc.dll"
1012 Delete /REBOOTOK "$R2\libvlc.dll"
1013 Delete /REBOOTOK "$R2\vlcintf.xpt"
1014 Goto "${Index}-Loop"
1018 Delete /REBOOTOK "$INSTDIR\npvlc.dll"
1019 Delete /REBOOTOK "$INSTDIR\npvlc.dll.manifest"
1021 RMDir "$SMPROGRAMS\VideoLAN"
1022 RMDir /r $SMPROGRAMS\VideoLAN
1024 FileOpen $UninstallLog "$INSTDIR\uninstall.log" r
1027 FileRead $UninstallLog $R0
1028 IfErrors UninstallEnd
1030 Call un.TrimNewLines
1032 Delete "$INSTDIR\$R0"
1035 FileClose $UninstallLog
1036 Delete "$INSTDIR\uninstall.log"
1037 Delete "$INSTDIR\uninstall.exe"
1039 Call un.RemoveEmptyDirs
1042 DeleteRegKey HKLM Software\VideoLAN
1044 DeleteRegKey HKCR Applications\vlc.exe
1045 DeleteRegKey HKCR AudioCD\shell\PlayWithVLC
1046 DeleteRegKey HKCR DVD\shell\PlayWithVLC
1047 DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival"
1048 DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival
1049 DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival"
1050 DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival
1051 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoCDMovieOnArrival" "VLCPlayVCDMovieOnArrival"
1052 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival
1053 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlaySuperVideoCDMovieOnArrival" "VLCPlaySVCDMovieOnArrival"
1054 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival
1055 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDAudioOnArrival" "VLCPlayDVDAudioOnArrival"
1056 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival
1057 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoFilesOnArrival" "VLCPlayVideoFilesOnArrival"
1058 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival
1059 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayMusicFilesOnArrival" "VLCPlayMusicFilesOnArrival"
1060 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival
1062 DeleteRegKey HKLM Software\Clients\Media\VLC
1063 DeleteRegValue HKLM "Software\RegisteredApplications" "VLC"
1064 DeleteRegKey HKCR "VLC.MediaFile"
1065 DeleteRegKey HKCR "VLC.DVDMovie"
1066 DeleteRegKey HKCR "VLC.CDAudio"
1067 DeleteRegKey HKCR "VLC.VCDMovie"
1068 DeleteRegKey HKCR "VLC.SVCDMovie"
1069 DeleteRegKey HKCR "VLC.OPENFolder"
1073 "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}"
1076 "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
1078 Delete "$DESKTOP\VLC media player.lnk"
1080 DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
1081 DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
1085 Section /o "un.$Name_Section92" SEC92
1086 !insertmacro delprefs
1089 ; Uninstaller section descriptions
1090 !insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
1091 !insertmacro MUI_DESCRIPTION_TEXT ${SEC91} $Desc_Section91
1092 !insertmacro MUI_DESCRIPTION_TEXT ${SEC92} $Desc_Section92
1093 !insertmacro MUI_UNFUNCTION_DESCRIPTION_END
1095 Function un.OnUnInstFailed
1099 Function un.OnUnInstSuccess
1101 Delete "$INSTDIR\UAC.dll"
1108 StrCmp 1223 $0 UAC_ElevationAborted
1109 StrCmp 0 $0 0 UAC_Err
1110 StrCmp 1 $1 0 UAC_Success
1114 MessageBox mb_iconstop "Unable to elevate, error $0"
1117 UAC_ElevationAborted:
1118 MessageBox mb_iconstop "This installer requires admin access, aborting!"
1123 StrCmp 3 $1 0 UAC_ElevationAborted
1124 MessageBox mb_iconstop "This installer requires admin access, try again"
1127 !insertmacro MUI_UNGETLANGUAGE
1129 !include "languages\english.nsh"
1130 StrCmp $LANGUAGE ${LANG_FRENCH} French 0
1131 StrCmp $LANGUAGE ${LANG_GERMAN} German 0
1132 StrCmp $LANGUAGE ${LANG_ITALIAN} Italian 0
1133 StrCmp $LANGUAGE ${LANG_HUNGARIAN} Hungarian 0
1134 StrCmp $LANGUAGE ${LANG_ROMANIAN} Romanian 0
1135 StrCmp $LANGUAGE ${LANG_CATALAN} Catalan 0
1136 StrCmp $LANGUAGE ${LANG_BULGARIAN} Bulgarian 0
1137 StrCmp $LANGUAGE ${LANG_SLOVAK} Slovak 0
1138 StrCmp $LANGUAGE ${LANG_POLISH} Polish 0
1139 StrCmp $LANGUAGE ${LANG_DUTCH} Dutch 0
1140 StrCmp $LANGUAGE ${LANG_DANISH} Danish 0
1141 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} SChinese 0
1142 StrCmp $LANGUAGE ${LANG_FINNISH} Finnish 0
1143 StrCmp $LANGUAGE ${LANG_JAPANESE} Japanese 0
1144 ; StrCmp $LANGUAGE ${LANG_BENGALI} Bengali 0
1145 ; StrCmp $LANGUAGE ${LANG_PUNJABI} Punjabi 0
1146 ; StrCmp $LANGUAGE ${LANG_SLOVENIAN} Slovenian 0
1147 StrCmp $LANGUAGE ${LANG_SPANISH} Spanish 0
1148 StrCmp $LANGUAGE ${LANG_ESTONIAN} Estonian 0
1149 StrCmp $LANGUAGE ${LANG_LITHUANIAN} Lithuanian 0
1150 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} Brazilian EndLanguageCmp
1152 !include "languages\french.nsh"
1155 !include "languages\german.nsh"
1158 !include "languages\italian.nsh"
1161 !include "languages\hungarian.nsh"
1164 !include "languages\romanian.nsh"
1167 !include "languages\catalan.nsh"
1170 !include "languages\bulgarian.nsh"
1173 !include "languages\slovak.nsh"
1176 !include "languages\polish.nsh"
1179 !include "languages\dutch.nsh"
1182 !include "languages\danish.nsh"
1185 !include "languages\schinese.nsh"
1188 !include "languages\finnish.nsh"
1191 !include "languages\japanese.nsh"
1194 !include "languages\bengali.nsh"
1197 !include "languages\punjabi.nsh"
1200 !include "languages\slovenian.nsh"
1203 !include "languages\spanish.nsh"
1206 !include "languages\estonian.nsh"
1209 !include "languages\lithuanian.nsh"
1212 !include "languages\brazilian_portuguese.nsh"