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"
136 ; Reserve files for solid compression
137 !insertmacro MUI_RESERVEFILE_LANGDLL
138 !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
142 ;;;;;;;;;;;;;;;;;;;;;;;
143 ; Macro and Functions ;
144 ;;;;;;;;;;;;;;;;;;;;;;;
146 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
147 ; 1. File type associations ;
148 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
150 ;; Function that registers one extension for VLC
151 Function RegisterExtension
152 ; back up old value for extension $R0 (eg. ".opt")
153 ReadRegStr $1 HKCR "$R0" ""
154 StrCmp $1 "" NoBackup
155 StrCmp $1 "VLC$R0" "NoBackup"
156 WriteRegStr HKCR "$R0" "VLC.backup" $1
158 WriteRegStr HKCR "$R0" "" "VLC$R0"
159 ReadRegStr $0 HKCR "VLC$R0" ""
160 WriteRegStr HKCR "VLC$R0" "" "VLC media file ($R0)"
161 WriteRegStr HKCR "VLC$R0\shell" "" "Open"
162 WriteRegStr HKCR "VLC$R0\shell\Open" "" $ShellAssociation_Play
163 WriteRegStr HKCR "VLC$R0\shell\Open\command" "" '"$INSTDIR\vlc.exe" --started-from-file "%1"'
164 WriteRegStr HKCR "VLC$R0\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
167 ; Vista and above detection
168 ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
170 StrCmp $R2 '6' ForVista ToEnd
172 WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities\FileAssociations" "$R0" "VLC$R0"
177 ;; Function that registers one skin extension for VLC
178 Function RegisterSkinExtension
179 ; back up old value for extension $R0 (eg. ".opt")
180 ReadRegStr $1 HKCR "$R0" ""
181 StrCmp $1 "" NoBackup
182 StrCmp $1 "VLC$R0" "NoBackup"
183 WriteRegStr HKCR "$R0" "VLC.backup" $1
185 WriteRegStr HKCR "$R0" "" "VLC$R0"
186 ReadRegStr $0 HKCR "VLC$R0" ""
187 WriteRegStr HKCR "VLC$R0" "" "VLC skin file ($R0)"
188 WriteRegStr HKCR "VLC$R0\shell" "" "Open"
189 WriteRegStr HKCR "VLC$R0\shell\Open" "" ""
190 WriteRegStr HKCR "VLC$R0\shell\Open\command" "" '"$INSTDIR\vlc.exe" -Iskins --skins2-last "%1"'
191 WriteRegStr HKCR "VLC$R0\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
194 ; Vista and above detection
195 ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
197 StrCmp $R2 '6' ForVista ToEnd
199 WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities\FileAssociations" "$R0" "VLC$R0"
204 ;; Function that removes one extension that VLC owns.
205 Function un.RegisterExtension
206 ;start of restore script
207 ReadRegStr $1 HKCR "$R0" ""
208 StrCmp $1 "VLC$R0" 0 NoOwn ; only do this if we own it
209 ; Read the old value from Backup
210 ReadRegStr $1 HKCR "$R0" "VLC.backup"
211 StrCmp $1 "" 0 Restore ; if backup="" then delete the whole key
212 DeleteRegKey HKCR "$R0"
215 WriteRegStr HKCR "$R0" "" $1
216 DeleteRegValue HKCR "$R0" "VLC.backup"
218 DeleteRegKey HKCR "VLC$R0" ;Delete key with association settings
219 DeleteRegKey HKLM "Software\Clients\Media\VLC\Capabilities\FileAssociations\VLC$R0" ; for vista
222 !macro RegisterExtensionSection EXT
227 Call RegisterExtension
232 !macro RegisterSkinExtensionSection EXT
237 Call RegisterSkinExtension
242 !macro UnRegisterExtensionSection EXT
245 Call un.RegisterExtension
249 !macro WriteRegStrSupportedTypes EXT
250 WriteRegStr HKCR Applications\vlc.exe\SupportedTypes ${EXT} ""
253 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
254 ; Extension lists Macros ;
255 ; Those macros calls the previous functions ;
256 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
258 !macro MacroAudioExtensions _action
259 !insertmacro ${_action} ".a52"
260 !insertmacro ${_action} ".aac"
261 !insertmacro ${_action} ".ac3"
262 !insertmacro ${_action} ".adt"
263 !insertmacro ${_action} ".adts"
264 !insertmacro ${_action} ".aif"
265 !insertmacro ${_action} ".aifc"
266 !insertmacro ${_action} ".aiff"
267 !insertmacro ${_action} ".au"
268 !insertmacro ${_action} ".amr"
269 !insertmacro ${_action} ".aob"
270 !insertmacro ${_action} ".ape"
271 !insertmacro ${_action} ".cda"
272 !insertmacro ${_action} ".dts"
273 !insertmacro ${_action} ".flac"
274 !insertmacro ${_action} ".it"
275 !insertmacro ${_action} ".m4a"
276 !insertmacro ${_action} ".m4p"
277 !insertmacro ${_action} ".mid"
278 !insertmacro ${_action} ".mka"
279 !insertmacro ${_action} ".mlp"
280 !insertmacro ${_action} ".mod"
281 !insertmacro ${_action} ".mp1"
282 !insertmacro ${_action} ".mp2"
283 !insertmacro ${_action} ".mp3"
284 !insertmacro ${_action} ".mpc"
285 !insertmacro ${_action} ".oma"
286 !insertmacro ${_action} ".oga"
287 !insertmacro ${_action} ".rmi"
288 !insertmacro ${_action} ".snd"
289 !insertmacro ${_action} ".s3m"
290 !insertmacro ${_action} ".spx"
291 !insertmacro ${_action} ".tta"
292 !insertmacro ${_action} ".voc"
293 !insertmacro ${_action} ".vqf"
294 !insertmacro ${_action} ".w64"
295 !insertmacro ${_action} ".wav"
296 !insertmacro ${_action} ".wma"
297 !insertmacro ${_action} ".wv"
298 !insertmacro ${_action} ".xa"
299 !insertmacro ${_action} ".xm"
302 !macro MacroVideoExtensions _action
303 !insertmacro ${_action} ".3g2"
304 !insertmacro ${_action} ".3gp"
305 !insertmacro ${_action} ".3gp2"
306 !insertmacro ${_action} ".3gpp"
307 !insertmacro ${_action} ".amv"
308 !insertmacro ${_action} ".asf"
309 !insertmacro ${_action} ".avi"
310 !insertmacro ${_action} ".divx"
311 !insertmacro ${_action} ".dv"
312 !insertmacro ${_action} ".flv"
313 !insertmacro ${_action} ".gxf"
314 !insertmacro ${_action} ".m1v"
315 !insertmacro ${_action} ".m2t"
316 !insertmacro ${_action} ".m2v"
317 !insertmacro ${_action} ".m2ts"
318 !insertmacro ${_action} ".m4v"
319 !insertmacro ${_action} ".mkv"
320 !insertmacro ${_action} ".mov"
321 !insertmacro ${_action} ".mp2"
322 !insertmacro ${_action} ".mp2v"
323 !insertmacro ${_action} ".mp4"
324 !insertmacro ${_action} ".mp4v"
325 !insertmacro ${_action} ".mpa"
326 !insertmacro ${_action} ".mpe"
327 !insertmacro ${_action} ".mpeg"
328 !insertmacro ${_action} ".mpeg1"
329 !insertmacro ${_action} ".mpeg2"
330 !insertmacro ${_action} ".mpeg4"
331 !insertmacro ${_action} ".mpg"
332 !insertmacro ${_action} ".mpv2"
333 !insertmacro ${_action} ".mts"
334 !insertmacro ${_action} ".mxf"
335 !insertmacro ${_action} ".nsv"
336 !insertmacro ${_action} ".nuv"
337 !insertmacro ${_action} ".ogg"
338 !insertmacro ${_action} ".ogm"
339 !insertmacro ${_action} ".ogx"
340 !insertmacro ${_action} ".ogv"
341 !insertmacro ${_action} ".ps"
342 !insertmacro ${_action} ".rec"
343 !insertmacro ${_action} ".rm"
344 !insertmacro ${_action} ".rmvb"
345 !insertmacro ${_action} ".tod"
346 !insertmacro ${_action} ".ts"
347 !insertmacro ${_action} ".tts"
348 !insertmacro ${_action} ".vob"
349 !insertmacro ${_action} ".vro"
350 !insertmacro ${_action} ".webm"
351 !insertmacro ${_action} ".wmv"
354 !macro MacroOtherExtensions _action
355 !insertmacro ${_action} ".asx"
356 !insertmacro ${_action} ".b4s"
357 !insertmacro ${_action} ".bin"
358 !insertmacro ${_action} ".cue"
359 !insertmacro ${_action} ".ifo"
360 !insertmacro ${_action} ".m3u"
361 !insertmacro ${_action} ".m3u8"
362 !insertmacro ${_action} ".pls"
363 !insertmacro ${_action} ".ram"
364 !insertmacro ${_action} ".sdp"
365 !insertmacro ${_action} ".vlc"
366 !insertmacro ${_action} ".xspf"
369 !macro MacroSkinExtensions _action
370 !insertmacro ${_action} ".vlt"
371 !insertmacro ${_action} ".wsz"
374 ; One macro to rule them all
375 !macro MacroAllExtensions _action
376 !insertmacro MacroAudioExtensions ${_action}
377 !insertmacro MacroVideoExtensions ${_action}
378 !insertmacro MacroOtherExtensions ${_action}
381 ;;;;;;;;;;;;;;;;;;;;;;;;;;;
382 ; 2. Context menu entries ;
383 ;;;;;;;;;;;;;;;;;;;;;;;;;;;
385 ; Generic function for adding the context menu for one ext.
386 !macro AddContextMenuExt EXT
387 WriteRegStr HKCR ${EXT}\shell\PlayWithVLC "" $ContextMenuEntry_PlayWith
388 WriteRegStr HKCR ${EXT}\shell\PlayWithVLC\command "" '"$INSTDIR\vlc.exe" --started-from-file --no-playlist-enqueue "%1"'
390 WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC "" $ContextMenuEntry_AddToPlaylist
391 WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC\command "" '"$INSTDIR\vlc.exe" --started-from-file --playlist-enqueue "%1"'
394 !macro AddContextMenu EXT
396 ReadRegStr $R0 HKCR ${EXT} ""
397 !insertmacro AddContextMenuExt $R0
401 !macro DeleteContextMenuExt EXT
402 DeleteRegKey HKCR ${EXT}\shell\PlayWithVLC
403 DeleteRegKey HKCR ${EXT}\shell\AddToPlaylistVLC
406 !macro DeleteContextMenu EXT
408 ReadRegStr $R0 HKCR ${EXT} ""
409 !insertmacro DeleteContextMenuExt $R0
413 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
415 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
419 !define Index 'Line${__LINE__}'
422 ; this will loop through all the logged users and "virtual" windows users
423 ; (it looks like users are only present in HKEY_USERS when they are logged in)
425 EnumRegKey $1 HKU "" $0
426 StrCmp $1 "" "${Index}-End"
428 ReadRegStr $2 HKU "$1\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" AppData
429 StrCmp $2 "" "${Index}-Loop"
440 !macro OpenUninstallLog
441 FileOpen $UninstallLog "$INSTDIR\uninstall.log" a
442 FileSeek $UninstallLog 0 END
445 !macro CloseUninstallLog
446 FileClose $UninstallLog
447 SetFileAttributes "$INSTDIR\uninstall.log" HIDDEN
453 !macro InstallFile FILEREGEX
455 !define Index 'Line${__LINE__}'
456 FindFirst $0 $1 "$INSTDIR\${FILEREGEX}"
457 StrCmp $0 "" "${Index}-End"
459 StrCmp $1 "" "${Index}-End"
460 FileWrite $UninstallLog "$1$\r$\n"
467 !macro InstallFolder FOLDER
470 Call InstallFolderInternal
473 Function InstallFolderInternal
475 !define Index 'Line${__LINE__}'
476 FindFirst $0 $1 "$INSTDIR\$9\*"
477 StrCmp $0 "" "${Index}-End"
479 StrCmp $1 "" "${Index}-End"
480 StrCmp $1 "." "${Index}-Next"
481 StrCmp $1 ".." "${Index}-Next"
482 IfFileExists "$9\$1\*" 0 "${Index}-Write"
486 Call InstallFolderInternal
491 FileWrite $UninstallLog "$9\$1$\r$\n"
501 ;;;;;;;;;;;;;;;;;;;;;;
502 ; Installer sections ;
505 ;;;;;;;;;;;;;;;;;;;;;;
507 Section $Name_Section01 SEC01
509 SetShellVarContext all
510 SetOutPath "$INSTDIR"
512 !insertmacro OpenUninstallLog
514 ; VLC.exe, libvlc.dll
515 !insertmacro InstallFile vlc.exe
516 !insertmacro InstallFile vlc.exe.manifest
517 !insertmacro InstallFile vlc-cache-gen.exe
520 !insertmacro InstallFile *.dll
523 !insertmacro InstallFile *.txt
526 !insertmacro InstallFolder plugins
527 !insertmacro InstallFolder locale
528 @BUILD_OSDMENU_TRUE@ !insertmacro InstallFolder osdmenu
529 @BUILD_SKINS_TRUE@ !insertmacro InstallFolder skins
530 @BUILD_HTTPD_TRUE@ !insertmacro InstallFolder http
531 @BUILD_LUA_TRUE@ !insertmacro InstallFolder lua
533 ; Generate the cache and add it to uninstall.log
534 ExecWait "$INSTDIR\vlc-cache-gen.exe $INSTDIR\plugins"
535 FindFirst $0 $1 "$INSTDIR\plugins\*.dat"
536 FileWrite $UninstallLog "plugins\$1$\r$\n"
542 WriteIniStr "$INSTDIR\${PRODUCT_GROUP} Website.url" "InternetShortcut" "URL" \
543 "${PRODUCT_WEB_SITE}"
544 FileWrite $UninstallLog "${PRODUCT_GROUP} Website.url$\r$\n"
545 WriteIniStr "$INSTDIR\Documentation.url" "InternetShortcut" "URL" \
546 "${PRODUCT_WEB_SITE}/doc/"
547 FileWrite $UninstallLog "Documentation.url$\r$\n"
548 WriteIniStr "$INSTDIR\New_Skins.url" "InternetShortcut" "URL" \
549 "${PRODUCT_WEB_SITE}/vlc/skins.php"
550 FileWrite $UninstallLog "New_Skins.url$\r$\n"
552 !insertmacro CloseUninstallLog
554 ; Add VLC to "recommended programs" for the following extensions
555 WriteRegStr HKCR Applications\vlc.exe "" ""
556 WriteRegStr HKCR Applications\vlc.exe "FriendlyAppName" "VLC media player"
557 WriteRegStr HKCR Applications\vlc.exe\shell\Open "" $ContextMenuEntry_PlayWith
558 WriteRegStr HKCR Applications\vlc.exe\shell\Open\command "" \
559 '"$INSTDIR\vlc.exe" --started-from-file "%1"'
560 !insertmacro MacroAllExtensions WriteRegStrSupportedTypes
562 ; Windows default programs Registration
563 ; Vista and above detection
564 ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
566 StrCmp $R1 '6' lbl_vista lbl_done
569 WriteRegStr HKLM "Software\RegisteredApplications" "VLC" "Software\Clients\Media\VLC\Capabilities"
570 WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationName" "VLC media player"
571 WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationDescription" "VLC - The video swiss knife"
572 WriteRegStr HKLM "Software\Clients\Media\VLC" "" "VLC media player"
573 WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "HideIconsCommand" "$\"$INSTDIR\spad-setup.exe$\" /HideIcons /S"
574 WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "ShowIconsCommand" "$\"$INSTDIR\spad-setup.exe$\" /ShowIcons /S"
575 WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "ReinstallCommand" "$\"$INSTDIR\spad-setup.exe$\" /Reinstall /S"
576 WriteRegDWORD HKLM "Software\Clients\Media\VLC\InstallInfo" "IconsVisible" 0x001
581 Section $Name_Section02a SEC02a
583 CreateDirectory "$SMPROGRAMS\VideoLAN"
584 CreateShortCut "$SMPROGRAMS\VideoLAN\Reset VLC media player preferences and cache files.lnk" \
585 "$INSTDIR\vlc.exe" "--reset-config --reset-plugins-cache vlc://quit"
586 CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player.lnk" \
587 "$INSTDIR\vlc.exe" ""
588 CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player skinned.lnk" \
589 "$INSTDIR\vlc.exe" "-Iskins"
590 CreateShortCut "$SMPROGRAMS\VideoLAN\Documentation.lnk" \
591 "$INSTDIR\Documentation.url"
592 CreateShortCut "$SMPROGRAMS\VideoLAN\Release Notes.lnk" \
593 "$INSTDIR\NEWS.txt" ""
594 CreateShortCut "$SMPROGRAMS\VideoLAN\${PRODUCT_GROUP} Website.lnk" \
595 "$INSTDIR\${PRODUCT_GROUP} Website.url"
598 Section $Name_Section02b SEC02b
600 CreateShortCut "$DESKTOP\VLC media player.lnk" \
601 "$INSTDIR\vlc.exe" ""
604 !ifdef INSTALL_MOZILLA
605 Section /o $Name_Section03 SEC03
608 SetOutPath "$INSTDIR"
609 !insertmacro OpenUninstallLog
610 !insertmacro InstallFile mozilla\npvlc.dll
611 !insertmacro InstallFile mozilla\npvlc.dll.manifest
612 !insertmacro CloseUninstallLog
614 !define Moz "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}"
615 WriteRegStr HKLM ${Moz} "Description" "VLC Multimedia Plugin"
616 WriteRegStr HKLM ${Moz} "Path" "$INSTDIR\npvlc.dll"
617 WriteRegStr HKLM ${Moz} "Product" "VLC media player"
618 WriteRegStr HKLM ${Moz} "Vendor" "VideoLAN"
619 WriteRegStr HKLM ${Moz} "Version" "${VERSION}"
623 !ifdef INSTALL_ACTIVEX
624 Section $Name_Section04 SEC04
627 SetOutPath "$INSTDIR"
628 !insertmacro OpenUninstallLog
629 !insertmacro InstallFile activex\axvlc.dll
630 !insertmacro InstallFile activex\axvlc.dll.manifest
631 !insertmacro CloseUninstallLog
632 RegDLL "$INSTDIR\axvlc.dll"
637 Section $Name_Section05 SEC05
639 WriteRegStr HKCR "AudioCD\shell\PlayWithVLC" "" $ContextMenuEntry_PlayWith
640 WriteRegStr HKCR "AudioCD\shell\PlayWithVLC\command" "" \
641 '"$INSTDIR\vlc.exe" --started-from-file cdda://%1'
642 WriteRegStr HKCR "DVD\shell\PlayWithVLC" "" $ContextMenuEntry_PlayWith
643 WriteRegStr HKCR "DVD\shell\PlayWithVLC\command" "" \
644 '"$INSTDIR\vlc.exe" --started-from-file dvd://%1'
646 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival" ""
647 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Action" $Action_OnArrivalDVD
648 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
649 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeProgID" "VLC.DVDMovie"
650 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeVerb" "Open"
651 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Provider" "VideoLAN VLC media player"
653 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival" ""
654 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Action" $Action_OnArrivalAudioCD
655 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
656 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeProgID" "VLC.CDAudio"
657 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeVerb" "Open"
658 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Provider" "VideoLAN VLC media player"
660 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoCDMovieOnArrival" "VLCPlayVCDMovieOnArrival" ""
661 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "Action" $Action_OnArrivalVCDMovie
662 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
663 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "InvokeProgID" "VLC.VCDMovie"
664 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "InvokeVerb" "Open"
665 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "Provider" "VideoLAN VLC media player"
667 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlaySuperVideoCDMovieOnArrival" "VLCPlaySVCDMovieOnArrival" ""
668 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "Action" $Action_OnArrivalSVCDMovie
669 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
670 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "InvokeProgID" "VLC.SVCDMovie"
671 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "InvokeVerb" "Open"
672 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "Provider" "VideoLAN VLC media player"
674 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDAudioOnArrival" "VLCPlayDVDAudioOnArrival" ""
675 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "Action" $Action_OnArrivalDVDAudio
676 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
677 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "InvokeProgID" "VLC.OPENFolder"
678 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "InvokeVerb" "Open"
679 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "Provider" "VideoLAN VLC media player"
681 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoFilesOnArrival" "VLCPlayVideoFilesOnArrival" ""
682 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "Action" $Action_OnArrivalVideoFiles
683 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
684 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "InvokeProgID" "VLC.OPENFolder"
685 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "InvokeVerb" "Open"
686 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "Provider" "VideoLAN VLC media player"
688 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayMusicFilesOnArrival" "VLCPlayMusicFilesOnArrival" ""
689 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "Action" $Action_OnArrivalMusicFiles
690 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
691 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "InvokeProgID" "VLC.OPENFolder"
692 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "InvokeVerb" "Open"
693 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "Provider" "VideoLAN VLC media player"
695 WriteRegStr HKCR "VLC.DVDMovie" "" "VLC DVD Movie"
696 WriteRegStr HKCR "VLC.DVDMovie\shell" "" "Open"
697 WriteRegStr HKCR "VLC.DVDMovie\shell\Open\command" "" \
698 '"$INSTDIR\vlc.exe" --started-from-file dvd://%1'
699 WriteRegStr HKCR "VLC.DVDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
701 WriteRegStr HKCR "VLC.CDAudio" "" "VLC CD Audio"
702 WriteRegStr HKCR "VLC.CDAudio\shell" "" "Open"
703 WriteRegStr HKCR "VLC.CDAudio\shell\Open\command" "" \
704 '"$INSTDIR\vlc.exe" --started-from-file cdda://%1'
705 WriteRegStr HKCR "VLC.CDAudio\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
707 WriteRegStr HKCR "VLC.VCDMovie" "" "VLC VCD Movie"
708 WriteRegStr HKCR "VLC.VCDMovie\shell" "" "Open"
709 WriteRegStr HKCR "VLC.VCDMovie\shell\Open\command" "" \
710 '"$INSTDIR\vlc.exe" --started-from-file vcd://%1'
711 WriteRegStr HKCR "VLC.VCDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
713 WriteRegStr HKCR "VLC.SVCDMovie" "" "VLC SVCD Movie"
714 WriteRegStr HKCR "VLC.SVCDMovie\shell" "" "Open"
715 WriteRegStr HKCR "VLC.SVCDMovie\shell\Open\command" "" \
716 '"$INSTDIR\vlc.exe" --started-from-file vcd://%1'
717 WriteRegStr HKCR "VLC.SVCDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
719 WriteRegStr HKCR "VLC.OPENFolder" "" "VLC Play content"
720 WriteRegStr HKCR "VLC.OPENFolder\shell" "" "Open"
721 WriteRegStr HKCR "VLC.OPENFolder\shell\Open\command" "" \
722 '"$INSTDIR\vlc.exe" %1'
723 WriteRegStr HKCR "VLC.OPENFolder\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
728 SectionGroup /e !$Name_Section06 SEC06
729 SectionGroup $Name_SectionGroupAudio
730 !insertmacro MacroAudioExtensions RegisterExtensionSection
732 SectionGroup $Name_SectionGroupVideo
733 !insertmacro MacroVideoExtensions RegisterExtensionSection
735 SectionGroup $Name_SectionGroupOther
736 !insertmacro MacroOtherExtensions RegisterExtensionSection
737 !insertmacro MacroSkinExtensions RegisterSkinExtensionSection
741 Section $Name_Section07 SEC07
743 !insertmacro MacroAllExtensions AddContextMenu
744 !insertmacro AddContextMenuExt "Directory"
747 Section $Name_Section08 SEC08
748 !insertmacro delprefs
751 ; Installer section descriptions
752 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
753 !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} $Desc_Section01
754 !insertmacro MUI_DESCRIPTION_TEXT ${SEC02a} $Desc_Section02a
755 !insertmacro MUI_DESCRIPTION_TEXT ${SEC02b} $Desc_Section02b
756 @BUILD_MOZILLA_TRUE@ !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} $Desc_Section03
757 @BUILD_ACTIVEX_TRUE@ !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} $Desc_Section04
758 !insertmacro MUI_DESCRIPTION_TEXT ${SEC05} $Desc_Section05
759 !insertmacro MUI_DESCRIPTION_TEXT ${SEC06} $Desc_Section06
760 !insertmacro MUI_DESCRIPTION_TEXT ${SEC07} $Desc_Section07
761 !insertmacro MUI_DESCRIPTION_TEXT ${SEC08} $Desc_Section08
762 !insertmacro MUI_FUNCTION_DESCRIPTION_END
769 StrCmp 1223 $0 UAC_ElevationAborted
770 StrCmp 0 $0 0 UAC_Err
771 StrCmp 1 $1 0 UAC_Success
775 MessageBox mb_iconstop "Unable to elevate, error $0"
778 UAC_ElevationAborted:
779 MessageBox mb_iconstop "This installer requires admin access, aborting!"
784 StrCmp 3 $1 0 UAC_ElevationAborted
785 MessageBox mb_iconstop "This installer requires admin access, try again"
787 !insertmacro MUI_LANGDLL_DISPLAY
789 !include "languages\english.nsh"
790 StrCmp $LANGUAGE ${LANG_FRENCH} French 0
791 StrCmp $LANGUAGE ${LANG_GERMAN} German 0
792 StrCmp $LANGUAGE ${LANG_ITALIAN} Italian 0
793 StrCmp $LANGUAGE ${LANG_HUNGARIAN} Hungarian 0
794 StrCmp $LANGUAGE ${LANG_ROMANIAN} Romanian 0
795 StrCmp $LANGUAGE ${LANG_CATALAN} Catalan 0
796 StrCmp $LANGUAGE ${LANG_BULGARIAN} Bulgarian 0
797 StrCmp $LANGUAGE ${LANG_SLOVAK} Slovak 0
798 StrCmp $LANGUAGE ${LANG_POLISH} Polish 0
799 StrCmp $LANGUAGE ${LANG_DUTCH} Dutch 0
800 StrCmp $LANGUAGE ${LANG_DANISH} Danish 0
801 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} SChinese 0
802 StrCmp $LANGUAGE ${LANG_FINNISH} Finnish 0
803 StrCmp $LANGUAGE ${LANG_JAPANESE} Japanese 0
804 ; StrCmp $LANGUAGE ${LANG_BENGALI} Bengali 0
805 ; StrCmp $LANGUAGE ${LANG_PUNJABI} Punjabi 0
806 ; StrCmp $LANGUAGE ${LANG_SLOVENIAN} Slovenian 0
807 StrCmp $LANGUAGE ${LANG_SPANISH} Spanish 0
808 StrCmp $LANGUAGE ${LANG_SPANISH} Estonian 0
809 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} Brazilian EndLanguageCmp
811 !include "languages\french.nsh"
814 !include "languages\german.nsh"
817 !include "languages\italian.nsh"
820 !include "languages\hungarian.nsh"
823 !include "languages\romanian.nsh"
826 !include "languages\catalan.nsh"
829 !include "languages\bulgarian.nsh"
832 !include "languages\slovak.nsh"
835 !include "languages\polish.nsh"
838 !include "languages\dutch.nsh"
841 !include "languages\schinese.nsh"
844 !include "languages\finnish.nsh"
847 !include "languages\japanese.nsh"
850 !include "languages\bengali.nsh"
853 !include "languages\punjabi.nsh"
856 !include "languages\slovenian.nsh"
859 !include "languages\spanish.nsh"
862 !include "languages\estonian.nsh"
865 !include "languages\brazilian_portuguese.nsh"
868 ReadRegStr $R0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
872 MessageBox MB_YESNO|MB_ICONEXCLAMATION $Message_AlreadyInstalled IDNO done
877 ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
882 Function .OnInstFailed
886 Function .OnInstSuccess
892 WriteUninstaller "$INSTDIR\uninstall.exe"
893 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "InstallDir" $INSTDIR
894 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "Version" "${VERSION}"
895 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\vlc.exe"
897 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
898 "DisplayName" "$(^Name)"
899 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
900 "UninstallString" "$INSTDIR\uninstall.exe"
901 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
902 "InstallLocation" "$INSTDIR"
903 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
904 "DisplayIcon" "$INSTDIR\vlc.exe"
905 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
906 "DisplayVersion" "${PRODUCT_VERSION}"
907 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
908 "URLInfoAbout" "${PRODUCT_WEB_SITE}"
909 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
910 "Publisher" "${PRODUCT_PUBLISHER}"
911 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
912 "VersionMajor" "@VERSION_MAJOR@"
913 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
914 "VersionMinor" "@VERSION_MINOR@"
917 ;;;;;;;;;;;;;;;;;;;;;;;;
918 ; Uninstaller sections ;
919 ;;;;;;;;;;;;;;;;;;;;;;;;
921 ; TrimNewlines (copied from NSIS documentation)
922 ; input, top of stack (e.g. whatever$\r$\n)
923 ; output, top of stack (replaces, with e.g. whatever)
924 ; modifies no other variables.
926 Function un.TrimNewlines
935 StrCmp $R2 "$\r" loop
936 StrCmp $R2 "$\n" loop
938 IntCmp $R1 0 no_trim_needed
947 Function un.RemoveEmptyDirs
949 !define Index 'Line${__LINE__}'
950 FindFirst $0 $1 "$INSTDIR$9*"
951 StrCmp $0 "" "${Index}-End"
953 StrCmp $1 "" "${Index}-End"
954 StrCmp $1 "." "${Index}-Next"
955 StrCmp $1 ".." "${Index}-Next"
960 Call un.RemoveEmptyDirs
974 Section "un.$Name_Section91" SEC91
976 SetShellVarContext all
978 !insertmacro MacroAllExtensions DeleteContextMenu
979 !insertmacro MacroAllExtensions UnRegisterExtensionSection
980 !insertmacro MacroSkinExtensions UnRegisterExtensionSection
981 !insertmacro DeleteContextMenuExt "Directory"
983 ;remove activex plugin
984 UnRegDLL "$INSTDIR\axvlc.dll"
985 Delete /REBOOTOK "$INSTDIR\axvlc.dll"
986 Delete /REBOOTOK "$INSTDIR\axvlc.dll.manifest"
988 ;remove mozilla plugin
993 !define Index 'Line${__LINE__}'
999 EnumRegKey $R0 HKLM "SOFTWARE\Mozilla" "$R1"
1000 StrCmp $R0 "" "${Index}-End"
1002 ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins"
1003 StrCmp $R2 "" "${Index}-Loop" ""
1005 ; old files (0.8.5 and before) that may be lying around
1006 Delete /REBOOTOK "$R2\npvlc.dll"
1007 Delete /REBOOTOK "$R2\libvlc.dll"
1008 Delete /REBOOTOK "$R2\vlcintf.xpt"
1009 Goto "${Index}-Loop"
1013 Delete /REBOOTOK "$INSTDIR\npvlc.dll"
1014 Delete /REBOOTOK "$INSTDIR\npvlc.dll.manifest"
1016 RMDir "$SMPROGRAMS\VideoLAN"
1017 RMDir /r $SMPROGRAMS\VideoLAN
1019 FileOpen $UninstallLog "$INSTDIR\uninstall.log" r
1022 FileRead $UninstallLog $R0
1023 IfErrors UninstallEnd
1025 Call un.TrimNewLines
1027 Delete "$INSTDIR\$R0"
1030 FileClose $UninstallLog
1031 Delete "$INSTDIR\uninstall.log"
1032 Delete "$INSTDIR\uninstall.exe"
1034 Call un.RemoveEmptyDirs
1037 DeleteRegKey HKLM Software\VideoLAN
1039 DeleteRegKey HKCR Applications\vlc.exe
1040 DeleteRegKey HKCR AudioCD\shell\PlayWithVLC
1041 DeleteRegKey HKCR DVD\shell\PlayWithVLC
1042 DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival"
1043 DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival
1044 DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival"
1045 DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival
1046 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoCDMovieOnArrival" "VLCPlayVCDMovieOnArrival"
1047 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival
1048 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlaySuperVideoCDMovieOnArrival" "VLCPlaySVCDMovieOnArrival"
1049 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival
1050 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDAudioOnArrival" "VLCPlayDVDAudioOnArrival"
1051 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival
1052 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoFilesOnArrival" "VLCPlayVideoFilesOnArrival"
1053 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival
1054 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayMusicFilesOnArrival" "VLCPlayMusicFilesOnArrival"
1055 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival
1057 DeleteRegKey HKLM Software\Clients\Media\VLC
1058 DeleteRegValue HKLM "Software\RegisteredApplications" "VLC"
1059 DeleteRegKey HKCR "VLC.MediaFile"
1060 DeleteRegKey HKCR "VLC.DVDMovie"
1061 DeleteRegKey HKCR "VLC.CDAudio"
1062 DeleteRegKey HKCR "VLC.VCDMovie"
1063 DeleteRegKey HKCR "VLC.SVCDMovie"
1064 DeleteRegKey HKCR "VLC.OPENFolder"
1068 "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}"
1071 "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
1073 Delete "$DESKTOP\VLC media player.lnk"
1075 DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
1076 DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
1080 Section /o "un.$Name_Section92" SEC92
1081 !insertmacro delprefs
1084 ; Uninstaller section descriptions
1085 !insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
1086 !insertmacro MUI_DESCRIPTION_TEXT ${SEC91} $Desc_Section91
1087 !insertmacro MUI_DESCRIPTION_TEXT ${SEC92} $Desc_Section92
1088 !insertmacro MUI_UNFUNCTION_DESCRIPTION_END
1090 Function un.OnUnInstFailed
1094 Function un.OnUnInstSuccess
1096 Delete "$INSTDIR\UAC.dll"
1103 StrCmp 1223 $0 UAC_ElevationAborted
1104 StrCmp 0 $0 0 UAC_Err
1105 StrCmp 1 $1 0 UAC_Success
1109 MessageBox mb_iconstop "Unable to elevate, error $0"
1112 UAC_ElevationAborted:
1113 MessageBox mb_iconstop "This installer requires admin access, aborting!"
1118 StrCmp 3 $1 0 UAC_ElevationAborted
1119 MessageBox mb_iconstop "This installer requires admin access, try again"
1122 !insertmacro MUI_UNGETLANGUAGE
1124 !include "languages\english.nsh"
1125 StrCmp $LANGUAGE ${LANG_FRENCH} French 0
1126 StrCmp $LANGUAGE ${LANG_GERMAN} German 0
1127 StrCmp $LANGUAGE ${LANG_ITALIAN} Italian 0
1128 StrCmp $LANGUAGE ${LANG_HUNGARIAN} Hungarian 0
1129 StrCmp $LANGUAGE ${LANG_ROMANIAN} Romanian 0
1130 StrCmp $LANGUAGE ${LANG_CATALAN} Catalan 0
1131 StrCmp $LANGUAGE ${LANG_BULGARIAN} Bulgarian 0
1132 StrCmp $LANGUAGE ${LANG_SLOVAK} Slovak 0
1133 StrCmp $LANGUAGE ${LANG_POLISH} Polish 0
1134 StrCmp $LANGUAGE ${LANG_DUTCH} Dutch 0
1135 StrCmp $LANGUAGE ${LANG_DANISH} Danish 0
1136 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} SChinese 0
1137 StrCmp $LANGUAGE ${LANG_FINNISH} Finnish 0
1138 StrCmp $LANGUAGE ${LANG_JAPANESE} Japanese 0
1139 ; StrCmp $LANGUAGE ${LANG_BENGALI} Bengali 0
1140 ; StrCmp $LANGUAGE ${LANG_PUNJABI} Punjabi 0
1141 ; StrCmp $LANGUAGE ${LANG_SLOVENIAN} Slovenian 0
1142 StrCmp $LANGUAGE ${LANG_SPANISH} Spanish 0
1143 StrCmp $LANGUAGE ${LANG_ESTONIAN} Estonian 0
1144 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} Brazilian EndLanguageCmp
1146 !include "languages\french.nsh"
1149 !include "languages\german.nsh"
1152 !include "languages\italian.nsh"
1155 !include "languages\hungarian.nsh"
1158 !include "languages\romanian.nsh"
1161 !include "languages\catalan.nsh"
1164 !include "languages\bulgarian.nsh"
1167 !include "languages\slovak.nsh"
1170 !include "languages\polish.nsh"
1173 !include "languages\dutch.nsh"
1176 !include "languages\danish.nsh"
1179 !include "languages\schinese.nsh"
1182 !include "languages\finnish.nsh"
1185 !include "languages\japanese.nsh"
1188 !include "languages\bengali.nsh"
1191 !include "languages\punjabi.nsh"
1194 !include "languages\slovenian.nsh"
1197 !include "languages\spanish.nsh"
1200 !include "languages\estonian.nsh"
1203 !include "languages\brazilian_portuguese.nsh"