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 $Licence_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"
138 ; Reserve files for solid compression
139 !insertmacro MUI_RESERVEFILE_LANGDLL
140 !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
144 ;;;;;;;;;;;;;;;;;;;;;;;
145 ; Macro and Functions ;
146 ;;;;;;;;;;;;;;;;;;;;;;;
148 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
149 ; 1. File type associations ;
150 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
152 ;; Function that registers one extension for VLC
153 Function RegisterExtension
154 ; back up old value for extension $R0 (eg. ".opt")
155 ReadRegStr $1 HKCR "$R0" ""
156 StrCmp $1 "" NoBackup
157 StrCmp $1 "VLC$R0" "NoBackup"
158 WriteRegStr HKCR "$R0" "VLC.backup" $1
160 WriteRegStr HKCR "$R0" "" "VLC$R0"
161 ReadRegStr $0 HKCR "VLC$R0" ""
162 WriteRegStr HKCR "VLC$R0" "" "VLC media file ($R0)"
163 WriteRegStr HKCR "VLC$R0\shell" "" "Open"
164 WriteRegStr HKCR "VLC$R0\shell\Open" "" $ShellAssociation_Play
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 @BUILD_OSDMENU_TRUE@ !insertmacro InstallFolder osdmenu
533 @BUILD_SKINS_TRUE@ !insertmacro InstallFolder skins
534 @BUILD_LUA_TRUE@ !insertmacro InstallFolder lua
536 ; Generate the cache and add it to uninstall.log
537 ExecWait "$INSTDIR\vlc-cache-gen.exe $INSTDIR\plugins"
538 FindFirst $0 $1 "$INSTDIR\plugins\*.dat"
539 FileWrite $UninstallLog "plugins\$1$\r$\n"
545 WriteIniStr "$INSTDIR\${PRODUCT_GROUP} Website.url" "InternetShortcut" "URL" \
546 "${PRODUCT_WEB_SITE}"
547 FileWrite $UninstallLog "${PRODUCT_GROUP} Website.url$\r$\n"
548 WriteIniStr "$INSTDIR\Documentation.url" "InternetShortcut" "URL" \
549 "${PRODUCT_WEB_SITE}/doc/"
550 FileWrite $UninstallLog "Documentation.url$\r$\n"
551 WriteIniStr "$INSTDIR\New_Skins.url" "InternetShortcut" "URL" \
552 "${PRODUCT_WEB_SITE}/vlc/skins.php"
553 FileWrite $UninstallLog "New_Skins.url$\r$\n"
555 !insertmacro CloseUninstallLog
557 ; Add VLC to "recommended programs" for the following extensions
558 WriteRegStr HKCR Applications\vlc.exe "" ""
559 WriteRegStr HKCR Applications\vlc.exe "FriendlyAppName" "VLC media player"
560 WriteRegStr HKCR Applications\vlc.exe\shell\Open "" $ContextMenuEntry_PlayWith
561 WriteRegStr HKCR Applications\vlc.exe\shell\Open\command "" \
562 '"$INSTDIR\vlc.exe" --started-from-file "%1"'
563 !insertmacro MacroAllExtensions WriteRegStrSupportedTypes
565 ; Windows default programs Registration
566 ; Vista and above detection
567 ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
569 StrCmp $R1 '6' lbl_vista lbl_done
572 WriteRegStr HKLM "Software\RegisteredApplications" "VLC" "Software\Clients\Media\VLC\Capabilities"
573 WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationName" "VLC media player"
574 WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationDescription" "VLC - The video swiss knife"
575 WriteRegStr HKLM "Software\Clients\Media\VLC" "" "VLC media player"
576 WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "HideIconsCommand" "$\"$INSTDIR\spad-setup.exe$\" /HideIcons /S"
577 WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "ShowIconsCommand" "$\"$INSTDIR\spad-setup.exe$\" /ShowIcons /S"
578 WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "ReinstallCommand" "$\"$INSTDIR\spad-setup.exe$\" /Reinstall /S"
579 WriteRegDWORD HKLM "Software\Clients\Media\VLC\InstallInfo" "IconsVisible" 0x001
584 Section $Name_Section02a SEC02a
586 CreateDirectory "$SMPROGRAMS\VideoLAN"
587 CreateShortCut "$SMPROGRAMS\VideoLAN\Reset VLC media player preferences and cache files.lnk" \
588 "$INSTDIR\vlc.exe" "--reset-config --reset-plugins-cache vlc://quit"
589 CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player.lnk" \
590 "$INSTDIR\vlc.exe" ""
591 CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player skinned.lnk" \
592 "$INSTDIR\vlc.exe" "-Iskins"
593 CreateShortCut "$SMPROGRAMS\VideoLAN\Documentation.lnk" \
594 "$INSTDIR\Documentation.url"
595 CreateShortCut "$SMPROGRAMS\VideoLAN\Release Notes.lnk" \
596 "$INSTDIR\NEWS.txt" ""
597 CreateShortCut "$SMPROGRAMS\VideoLAN\${PRODUCT_GROUP} Website.lnk" \
598 "$INSTDIR\${PRODUCT_GROUP} Website.url"
601 Section $Name_Section02b SEC02b
603 CreateShortCut "$DESKTOP\VLC media player.lnk" \
604 "$INSTDIR\vlc.exe" ""
607 !ifdef INSTALL_MOZILLA
608 Section /o $Name_Section03 SEC03
611 SetOutPath "$INSTDIR"
612 !insertmacro OpenUninstallLog
613 !insertmacro InstallFile npvlc.dll
614 !insertmacro InstallFile npvlc.dll.manifest
615 !insertmacro CloseUninstallLog
617 !define Moz "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}"
618 WriteRegStr HKLM ${Moz} "Description" "VLC Multimedia Plugin"
619 WriteRegStr HKLM ${Moz} "Path" "$INSTDIR\npvlc.dll"
620 WriteRegStr HKLM ${Moz} "Product" "VLC media player"
621 WriteRegStr HKLM ${Moz} "Vendor" "VideoLAN"
622 WriteRegStr HKLM ${Moz} "Version" "${VERSION}"
626 !ifdef INSTALL_ACTIVEX
627 Section $Name_Section04 SEC04
630 SetOutPath "$INSTDIR"
631 !insertmacro OpenUninstallLog
632 !insertmacro InstallFile axvlc.dll
633 !insertmacro InstallFile axvlc.dll.manifest
634 !insertmacro CloseUninstallLog
635 RegDLL "$INSTDIR\axvlc.dll"
640 Section $Name_Section05 SEC05
642 WriteRegStr HKCR "AudioCD\shell\PlayWithVLC" "" $ContextMenuEntry_PlayWith
643 WriteRegStr HKCR "AudioCD\shell\PlayWithVLC\command" "" \
644 '"$INSTDIR\vlc.exe" --started-from-file cdda:///%1'
645 WriteRegStr HKCR "DVD\shell\PlayWithVLC" "" $ContextMenuEntry_PlayWith
646 WriteRegStr HKCR "DVD\shell\PlayWithVLC\command" "" \
647 '"$INSTDIR\vlc.exe" --started-from-file dvd:///%1'
649 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival" ""
650 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Action" $Action_OnArrivalDVD
651 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
652 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeProgID" "VLC.DVDMovie"
653 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeVerb" "Open"
654 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Provider" "VideoLAN VLC media player"
656 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival" ""
657 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Action" $Action_OnArrivalAudioCD
658 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
659 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeProgID" "VLC.CDAudio"
660 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeVerb" "Open"
661 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Provider" "VideoLAN VLC media player"
663 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoCDMovieOnArrival" "VLCPlayVCDMovieOnArrival" ""
664 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "Action" $Action_OnArrivalVCDMovie
665 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
666 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "InvokeProgID" "VLC.VCDMovie"
667 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "InvokeVerb" "Open"
668 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "Provider" "VideoLAN VLC media player"
670 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlaySuperVideoCDMovieOnArrival" "VLCPlaySVCDMovieOnArrival" ""
671 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "Action" $Action_OnArrivalSVCDMovie
672 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
673 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "InvokeProgID" "VLC.SVCDMovie"
674 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "InvokeVerb" "Open"
675 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "Provider" "VideoLAN VLC media player"
677 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDAudioOnArrival" "VLCPlayDVDAudioOnArrival" ""
678 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "Action" $Action_OnArrivalDVDAudio
679 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
680 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "InvokeProgID" "VLC.OPENFolder"
681 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "InvokeVerb" "Open"
682 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "Provider" "VideoLAN VLC media player"
684 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoFilesOnArrival" "VLCPlayVideoFilesOnArrival" ""
685 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "Action" $Action_OnArrivalVideoFiles
686 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
687 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "InvokeProgID" "VLC.OPENFolder"
688 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "InvokeVerb" "Open"
689 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "Provider" "VideoLAN VLC media player"
691 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayMusicFilesOnArrival" "VLCPlayMusicFilesOnArrival" ""
692 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "Action" $Action_OnArrivalMusicFiles
693 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
694 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "InvokeProgID" "VLC.OPENFolder"
695 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "InvokeVerb" "Open"
696 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "Provider" "VideoLAN VLC media player"
698 WriteRegStr HKCR "VLC.DVDMovie" "" "VLC DVD Movie"
699 WriteRegStr HKCR "VLC.DVDMovie\shell" "" "Open"
700 WriteRegStr HKCR "VLC.DVDMovie\shell\Open\command" "" \
701 '"$INSTDIR\vlc.exe" --started-from-file dvd:///%1'
702 WriteRegStr HKCR "VLC.DVDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
704 WriteRegStr HKCR "VLC.CDAudio" "" "VLC CD Audio"
705 WriteRegStr HKCR "VLC.CDAudio\shell" "" "Open"
706 WriteRegStr HKCR "VLC.CDAudio\shell\Open\command" "" \
707 '"$INSTDIR\vlc.exe" --started-from-file cdda:///%1'
708 WriteRegStr HKCR "VLC.CDAudio\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
710 WriteRegStr HKCR "VLC.VCDMovie" "" "VLC VCD Movie"
711 WriteRegStr HKCR "VLC.VCDMovie\shell" "" "Open"
712 WriteRegStr HKCR "VLC.VCDMovie\shell\Open\command" "" \
713 '"$INSTDIR\vlc.exe" --started-from-file vcd:///%1'
714 WriteRegStr HKCR "VLC.VCDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
716 WriteRegStr HKCR "VLC.SVCDMovie" "" "VLC SVCD Movie"
717 WriteRegStr HKCR "VLC.SVCDMovie\shell" "" "Open"
718 WriteRegStr HKCR "VLC.SVCDMovie\shell\Open\command" "" \
719 '"$INSTDIR\vlc.exe" --started-from-file vcd:///%1'
720 WriteRegStr HKCR "VLC.SVCDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
722 WriteRegStr HKCR "VLC.OPENFolder" "" "VLC Play content"
723 WriteRegStr HKCR "VLC.OPENFolder\shell" "" "Open"
724 WriteRegStr HKCR "VLC.OPENFolder\shell\Open\command" "" \
725 '"$INSTDIR\vlc.exe" %1'
726 WriteRegStr HKCR "VLC.OPENFolder\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
731 SectionGroup /e !$Name_Section06 SEC06
732 SectionGroup $Name_SectionGroupAudio
733 !insertmacro MacroAudioExtensions RegisterExtensionSection
735 SectionGroup $Name_SectionGroupVideo
736 !insertmacro MacroVideoExtensions RegisterExtensionSection
738 SectionGroup $Name_SectionGroupOther
739 !insertmacro MacroOtherExtensions RegisterExtensionSection
740 !insertmacro MacroSkinExtensions RegisterSkinExtensionSection
744 Section $Name_Section07 SEC07
746 !insertmacro MacroAllExtensions AddContextMenu
747 !insertmacro AddContextMenuExt "Directory"
750 Section /o $Name_Section08 SEC08
751 !insertmacro delprefs
754 ; Installer section descriptions
755 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
756 !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} $Desc_Section01
757 !insertmacro MUI_DESCRIPTION_TEXT ${SEC02a} $Desc_Section02a
758 !insertmacro MUI_DESCRIPTION_TEXT ${SEC02b} $Desc_Section02b
759 !ifdef INSTALL_MOZILLA
760 !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} $Desc_Section03
762 !ifdef INSTALL_ACTIVEX
763 !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} $Desc_Section04
765 !insertmacro MUI_DESCRIPTION_TEXT ${SEC05} $Desc_Section05
766 !insertmacro MUI_DESCRIPTION_TEXT ${SEC06} $Desc_Section06
767 !insertmacro MUI_DESCRIPTION_TEXT ${SEC07} $Desc_Section07
768 !insertmacro MUI_DESCRIPTION_TEXT ${SEC08} $Desc_Section08
769 !insertmacro MUI_FUNCTION_DESCRIPTION_END
776 StrCmp 1223 $0 UAC_ElevationAborted
777 StrCmp 0 $0 0 UAC_Err
778 StrCmp 1 $1 0 UAC_Success
782 MessageBox mb_iconstop "Unable to elevate, error $0"
785 UAC_ElevationAborted:
786 MessageBox mb_iconstop "This installer requires admin access, aborting!"
791 StrCmp 3 $1 0 UAC_ElevationAborted
792 MessageBox mb_iconstop "This installer requires admin access, try again"
794 !insertmacro MUI_LANGDLL_DISPLAY
796 !include "languages\english.nsh"
797 StrCmp $LANGUAGE ${LANG_FRENCH} French 0
798 StrCmp $LANGUAGE ${LANG_GERMAN} German 0
799 StrCmp $LANGUAGE ${LANG_ITALIAN} Italian 0
800 StrCmp $LANGUAGE ${LANG_HUNGARIAN} Hungarian 0
801 StrCmp $LANGUAGE ${LANG_ROMANIAN} Romanian 0
802 StrCmp $LANGUAGE ${LANG_CATALAN} Catalan 0
803 StrCmp $LANGUAGE ${LANG_BULGARIAN} Bulgarian 0
804 StrCmp $LANGUAGE ${LANG_SLOVAK} Slovak 0
805 StrCmp $LANGUAGE ${LANG_POLISH} Polish 0
806 StrCmp $LANGUAGE ${LANG_DUTCH} Dutch 0
807 StrCmp $LANGUAGE ${LANG_DANISH} Danish 0
808 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} SChinese 0
809 StrCmp $LANGUAGE ${LANG_FINNISH} Finnish 0
810 StrCmp $LANGUAGE ${LANG_JAPANESE} Japanese 0
811 ; StrCmp $LANGUAGE ${LANG_BENGALI} Bengali 0
812 ; StrCmp $LANGUAGE ${LANG_PUNJABI} Punjabi 0
813 ; StrCmp $LANGUAGE ${LANG_SLOVENIAN} Slovenian 0
814 StrCmp $LANGUAGE ${LANG_SPANISH} Spanish 0
815 StrCmp $LANGUAGE ${LANG_ESTONIAN} Estonian 0
816 StrCmp $LANGUAGE ${LANG_LITHUANIAN} Lithuanian 0
817 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} Brazilian EndLanguageCmp
819 !include "languages\french.nsh"
822 !include "languages\german.nsh"
825 !include "languages\italian.nsh"
828 !include "languages\hungarian.nsh"
831 !include "languages\romanian.nsh"
834 !include "languages\catalan.nsh"
837 !include "languages\bulgarian.nsh"
840 !include "languages\slovak.nsh"
843 !include "languages\polish.nsh"
846 !include "languages\dutch.nsh"
849 !include "languages\danish.nsh"
852 !include "languages\schinese.nsh"
855 !include "languages\finnish.nsh"
858 !include "languages\japanese.nsh"
861 !include "languages\bengali.nsh"
864 !include "languages\punjabi.nsh"
867 !include "languages\slovenian.nsh"
870 !include "languages\spanish.nsh"
873 !include "languages\estonian.nsh"
876 !include "languages\lithuanian.nsh"
879 !include "languages\brazilian_portuguese.nsh"
882 ReadRegStr $R0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
886 MessageBox MB_YESNO|MB_ICONEXCLAMATION $Message_AlreadyInstalled IDNO done
891 ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
896 Function .OnInstFailed
900 Function .OnInstSuccess
906 WriteUninstaller "$INSTDIR\uninstall.exe"
907 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "InstallDir" $INSTDIR
908 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "Version" "${VERSION}"
909 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\vlc.exe"
911 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
912 "DisplayName" "$(^Name)"
913 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
914 "UninstallString" "$INSTDIR\uninstall.exe"
915 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
916 "InstallLocation" "$INSTDIR"
917 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
918 "DisplayIcon" "$INSTDIR\vlc.exe"
919 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
920 "DisplayVersion" "${PRODUCT_VERSION}"
921 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
922 "URLInfoAbout" "${PRODUCT_WEB_SITE}"
923 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
924 "Publisher" "${PRODUCT_PUBLISHER}"
925 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
926 "VersionMajor" "@VERSION_MAJOR@"
927 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
928 "VersionMinor" "@VERSION_MINOR@"
931 ;;;;;;;;;;;;;;;;;;;;;;;;
932 ; Uninstaller sections ;
933 ;;;;;;;;;;;;;;;;;;;;;;;;
935 ; TrimNewlines (copied from NSIS documentation)
936 ; input, top of stack (e.g. whatever$\r$\n)
937 ; output, top of stack (replaces, with e.g. whatever)
938 ; modifies no other variables.
940 Function un.TrimNewlines
949 StrCmp $R2 "$\r" loop
950 StrCmp $R2 "$\n" loop
952 IntCmp $R1 0 no_trim_needed
961 Function un.RemoveEmptyDirs
963 !define Index 'Line${__LINE__}'
964 FindFirst $0 $1 "$INSTDIR$9*"
965 StrCmp $0 "" "${Index}-End"
967 StrCmp $1 "" "${Index}-End"
968 StrCmp $1 "." "${Index}-Next"
969 StrCmp $1 ".." "${Index}-Next"
974 Call un.RemoveEmptyDirs
988 Section "un.$Name_Section91" SEC91
990 SetShellVarContext all
992 !insertmacro MacroAllExtensions DeleteContextMenu
993 !insertmacro MacroAllExtensions UnRegisterExtensionSection
994 !insertmacro MacroSkinExtensions UnRegisterExtensionSection
995 !insertmacro DeleteContextMenuExt "Directory"
997 ;remove activex plugin
998 UnRegDLL "$INSTDIR\axvlc.dll"
999 Delete /REBOOTOK "$INSTDIR\axvlc.dll"
1000 Delete /REBOOTOK "$INSTDIR\axvlc.dll.manifest"
1002 ;remove mozilla plugin
1007 !define Index 'Line${__LINE__}'
1013 EnumRegKey $R0 HKLM "SOFTWARE\Mozilla" "$R1"
1014 StrCmp $R0 "" "${Index}-End"
1016 ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins"
1017 StrCmp $R2 "" "${Index}-Loop" ""
1019 ; old files (0.8.5 and before) that may be lying around
1020 Delete /REBOOTOK "$R2\npvlc.dll"
1021 Delete /REBOOTOK "$R2\libvlc.dll"
1022 Delete /REBOOTOK "$R2\vlcintf.xpt"
1023 Goto "${Index}-Loop"
1027 Delete /REBOOTOK "$INSTDIR\npvlc.dll"
1028 Delete /REBOOTOK "$INSTDIR\npvlc.dll.manifest"
1030 RMDir "$SMPROGRAMS\VideoLAN"
1031 RMDir /r $SMPROGRAMS\VideoLAN
1033 FileOpen $UninstallLog "$INSTDIR\uninstall.log" r
1036 FileRead $UninstallLog $R0
1037 IfErrors UninstallEnd
1039 Call un.TrimNewLines
1041 Delete "$INSTDIR\$R0"
1044 FileClose $UninstallLog
1045 Delete "$INSTDIR\uninstall.log"
1046 Delete "$INSTDIR\uninstall.exe"
1048 Call un.RemoveEmptyDirs
1051 DeleteRegKey HKLM Software\VideoLAN
1053 DeleteRegKey HKCR Applications\vlc.exe
1054 DeleteRegKey HKCR AudioCD\shell\PlayWithVLC
1055 DeleteRegKey HKCR DVD\shell\PlayWithVLC
1056 DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival"
1057 DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival
1058 DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival"
1059 DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival
1060 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoCDMovieOnArrival" "VLCPlayVCDMovieOnArrival"
1061 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival
1062 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlaySuperVideoCDMovieOnArrival" "VLCPlaySVCDMovieOnArrival"
1063 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival
1064 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDAudioOnArrival" "VLCPlayDVDAudioOnArrival"
1065 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival
1066 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoFilesOnArrival" "VLCPlayVideoFilesOnArrival"
1067 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival
1068 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayMusicFilesOnArrival" "VLCPlayMusicFilesOnArrival"
1069 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival
1071 DeleteRegKey HKLM Software\Clients\Media\VLC
1072 DeleteRegValue HKLM "Software\RegisteredApplications" "VLC"
1073 DeleteRegKey HKCR "VLC.MediaFile"
1074 DeleteRegKey HKCR "VLC.DVDMovie"
1075 DeleteRegKey HKCR "VLC.CDAudio"
1076 DeleteRegKey HKCR "VLC.VCDMovie"
1077 DeleteRegKey HKCR "VLC.SVCDMovie"
1078 DeleteRegKey HKCR "VLC.OPENFolder"
1082 "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}"
1085 "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
1087 Delete "$DESKTOP\VLC media player.lnk"
1089 DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
1090 DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
1094 Section /o "un.$Name_Section92" SEC92
1095 !insertmacro delprefs
1098 ; Uninstaller section descriptions
1099 !insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
1100 !insertmacro MUI_DESCRIPTION_TEXT ${SEC91} $Desc_Section91
1101 !insertmacro MUI_DESCRIPTION_TEXT ${SEC92} $Desc_Section92
1102 !insertmacro MUI_UNFUNCTION_DESCRIPTION_END
1104 Function un.OnUnInstFailed
1108 Function un.OnUnInstSuccess
1110 Delete "$INSTDIR\UAC.dll"
1117 StrCmp 1223 $0 UAC_ElevationAborted
1118 StrCmp 0 $0 0 UAC_Err
1119 StrCmp 1 $1 0 UAC_Success
1123 MessageBox mb_iconstop "Unable to elevate, error $0"
1126 UAC_ElevationAborted:
1127 MessageBox mb_iconstop "This installer requires admin access, aborting!"
1132 StrCmp 3 $1 0 UAC_ElevationAborted
1133 MessageBox mb_iconstop "This installer requires admin access, try again"
1136 !insertmacro MUI_UNGETLANGUAGE
1138 !include "languages\english.nsh"
1139 StrCmp $LANGUAGE ${LANG_FRENCH} French 0
1140 StrCmp $LANGUAGE ${LANG_GERMAN} German 0
1141 StrCmp $LANGUAGE ${LANG_ITALIAN} Italian 0
1142 StrCmp $LANGUAGE ${LANG_HUNGARIAN} Hungarian 0
1143 StrCmp $LANGUAGE ${LANG_ROMANIAN} Romanian 0
1144 StrCmp $LANGUAGE ${LANG_CATALAN} Catalan 0
1145 StrCmp $LANGUAGE ${LANG_BULGARIAN} Bulgarian 0
1146 StrCmp $LANGUAGE ${LANG_SLOVAK} Slovak 0
1147 StrCmp $LANGUAGE ${LANG_POLISH} Polish 0
1148 StrCmp $LANGUAGE ${LANG_DUTCH} Dutch 0
1149 StrCmp $LANGUAGE ${LANG_DANISH} Danish 0
1150 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} SChinese 0
1151 StrCmp $LANGUAGE ${LANG_FINNISH} Finnish 0
1152 StrCmp $LANGUAGE ${LANG_JAPANESE} Japanese 0
1153 ; StrCmp $LANGUAGE ${LANG_BENGALI} Bengali 0
1154 ; StrCmp $LANGUAGE ${LANG_PUNJABI} Punjabi 0
1155 ; StrCmp $LANGUAGE ${LANG_SLOVENIAN} Slovenian 0
1156 StrCmp $LANGUAGE ${LANG_SPANISH} Spanish 0
1157 StrCmp $LANGUAGE ${LANG_ESTONIAN} Estonian 0
1158 StrCmp $LANGUAGE ${LANG_LITHUANIAN} Lithuanian 0
1159 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} Brazilian EndLanguageCmp
1161 !include "languages\french.nsh"
1164 !include "languages\german.nsh"
1167 !include "languages\italian.nsh"
1170 !include "languages\hungarian.nsh"
1173 !include "languages\romanian.nsh"
1176 !include "languages\catalan.nsh"
1179 !include "languages\bulgarian.nsh"
1182 !include "languages\slovak.nsh"
1185 !include "languages\polish.nsh"
1188 !include "languages\dutch.nsh"
1191 !include "languages\danish.nsh"
1194 !include "languages\schinese.nsh"
1197 !include "languages\finnish.nsh"
1200 !include "languages\japanese.nsh"
1203 !include "languages\bengali.nsh"
1206 !include "languages\punjabi.nsh"
1209 !include "languages\slovenian.nsh"
1212 !include "languages\spanish.nsh"
1215 !include "languages\estonian.nsh"
1218 !include "languages\lithuanian.nsh"
1221 !include "languages\brazilian_portuguese.nsh"