1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 ; NSIS installer script for vlc ;
3 ; (http://nsis.sourceforge.net) ;
4 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6 !define PRODUCT_NAME
"VLC media player"
7 !define VERSION @VERSION@
8 !define PRODUCT_VERSION @VERSION@
9 !define PRODUCT_GROUP
"VideoLAN"
10 !define PRODUCT_PUBLISHER
"VideoLAN"
11 !define PRODUCT_WEB_SITE
"https://www.videolan.org/"
12 !define PRODUCT_DIR_REGKEY
"Software\VideoLAN\VLC"
13 !define PRODUCT_UNINST_KEY
"Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
14 !define PRODUCT_UNINST_ROOT_KEY
"HKLM"
15 !define PRODUCT_ID
"{ea92ef52-afe4-4212-bacb-dfe9fca94cd6}"
17 !define MUI_LANGDLL_REGISTRY_ROOT
"HKLM"
18 !define MUI_LANGDLL_REGISTRY_KEY
"${PRODUCT_DIR_REGKEY}"
19 !define MUI_LANGDLL_REGISTRY_VALUENAME
"Language"
21 !define MEMENTO_REGISTRY_ROOT
${PRODUCT_UNINST_ROOT_KEY}
22 !define MEMENTO_REGISTRY_KEY
"${PRODUCT_UNINST_KEY}"
24 @HAVE_WIN64_TRUE@
!define VLC_64BIT_INSTALLER
29 !define INSTALL_ACTIVEX
30 !define INSTALL_MOZILLA
33 Var ReinstallUninstallBtn
36 Var PreviousVersionState
37 Var PreviousInstallDir
43 ;;;;;;;;;;;;;;;;;;;;;;;;;
44 ; General configuration ;
45 ;;;;;;;;;;;;;;;;;;;;;;;;;
47 Name "${PRODUCT_NAME}"
48 @HAVE_WIN64_FALSE@
OutFile ..\vlc
-${VERSION}-win32
.exe
49 @HAVE_WIN64_TRUE@
OutFile ..\vlc
-${VERSION}-win64
.exe
50 InstallDir "$@PROGRAMFILES@\VideoLAN\VLC"
51 !ifdef NSIS_LZMA_COMPRESS_WHOLE
54 SetCompressor
/SOLID lzma
59 BrandingText "${PRODUCT_GROUP} ${PRODUCT_NAME}"
61 InstType "$(Name_InstTypeRecommended)"
62 InstType "$(Name_InstTypeMinimum)"
63 InstType "$(Name_InstTypeFull)"
65 RequestExecutionLevel admin
68 !include nsProcess
.nsh
74 !insertmacro GetParameters
75 !insertmacro GetOptions
77 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
78 ; NSIS Modern User Interface configuration ;
79 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
82 !define MUI_ABORTWARNING
83 !define MUI_ICON
"vlc.ico"
84 !define MUI_UNICON
"vlc.ico"
85 !define MUI_COMPONENTSPAGE_SMALLDESC
87 ; Banner (welcome and finish page) for installer
88 !define MUI_WELCOMEFINISHPAGE_BITMAP
"NSIS/vlc_branding.bmp"
89 ; Banner for uninstaller
90 !define MUI_UNWELCOMEFINISHPAGE_BITMAP
"NSIS/vlc_branding.bmp"
94 !define MUI_PAGE_CUSTOMFUNCTION_PRE PageFastUpdatePre
95 !define MUI_WELCOMEPAGE_TITLE_3LINES
96 !insertmacro MUI_PAGE_WELCOME
97 ; Optional update page
98 Page custom PageReinstall PageLeaveReinstall
100 !define MUI_LICENSEPAGE_BUTTON
$(^NextBtn
)
101 !define MUI_LICENSEPAGE_TEXT_BOTTOM
"$(License_NextText)"
102 !define MUI_PAGE_CUSTOMFUNCTION_PRE PageSkipPre
103 !insertmacro MUI_PAGE_LICENSE
"COPYING.txt"
105 !define MUI_PAGE_CUSTOMFUNCTION_PRE PageComponentsPre
106 !insertmacro MUI_PAGE_COMPONENTS
108 !define MUI_PAGE_CUSTOMFUNCTION_PRE PageDirectoryPre
109 !insertmacro MUI_PAGE_DIRECTORY
111 !insertmacro MUI_PAGE_INSTFILES
113 !define MUI_PAGE_CUSTOMFUNCTION_PRE PageFastUpdatePre
114 !define MUI_FINISHPAGE_RUN
115 !define MUI_FINISHPAGE_RUN_FUNCTION AppExecAs
116 !define MUI_FINISHPAGE_LINK
"$(Link_VisitWebsite)"
117 !define MUI_FINISHPAGE_LINK_LOCATION
"https://www.videolan.org/vlc/"
118 !define MUI_FINISHPAGE_NOREBOOTSUPPORT
119 !insertmacro MUI_PAGE_FINISH
122 !insertmacro MUI_UNPAGE_CONFIRM
123 !insertmacro MUI_UNPAGE_COMPONENTS
124 !insertmacro MUI_UNPAGE_INSTFILES
125 !insertmacro MUI_UNPAGE_FINISH
127 !addincludedir "languages"
128 !define VLC_LANGFILE_FALLBACK
"EnglishExtra.nsh"
130 ; Language files (first language is default)
131 !insertmacro MUI_LANGUAGE
"English"
132 !insertmacro LANGFILE_INCLUDE
"EnglishExtra.nsh"
134 !insertmacro MUI_LANGUAGE
"French"
135 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"FrenchExtra.nsh" ${VLC_LANGFILE_FALLBACK}
136 !insertmacro MUI_LANGUAGE
"German"
137 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"GermanExtra.nsh" ${VLC_LANGFILE_FALLBACK}
138 !insertmacro MUI_LANGUAGE
"Spanish"
139 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"SpanishExtra.nsh" ${VLC_LANGFILE_FALLBACK}
140 !insertmacro MUI_LANGUAGE
"SimpChinese"
141 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"SimpChineseExtra.nsh" ${VLC_LANGFILE_FALLBACK}
142 !insertmacro MUI_LANGUAGE
"TradChinese"
143 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"TradChineseExtra.nsh" ${VLC_LANGFILE_FALLBACK}
144 !insertmacro MUI_LANGUAGE
"Japanese"
145 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"JapaneseExtra.nsh" ${VLC_LANGFILE_FALLBACK}
146 !insertmacro MUI_LANGUAGE
"Italian"
147 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"ItalianExtra.nsh" ${VLC_LANGFILE_FALLBACK}
148 !insertmacro MUI_LANGUAGE
"Dutch"
149 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"DutchExtra.nsh" ${VLC_LANGFILE_FALLBACK}
150 !insertmacro MUI_LANGUAGE
"Danish"
151 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"DanishExtra.nsh" ${VLC_LANGFILE_FALLBACK}
152 !insertmacro MUI_LANGUAGE
"Swedish"
153 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"SwedishExtra.nsh" ${VLC_LANGFILE_FALLBACK}
154 !insertmacro MUI_LANGUAGE
"Finnish"
155 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"FinnishExtra.nsh" ${VLC_LANGFILE_FALLBACK}
156 !insertmacro MUI_LANGUAGE
"Russian"
157 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"RussianExtra.nsh" ${VLC_LANGFILE_FALLBACK}
158 !insertmacro MUI_LANGUAGE
"Portuguese"
159 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"PortugueseExtra.nsh" ${VLC_LANGFILE_FALLBACK}
160 !insertmacro MUI_LANGUAGE
"PortugueseBR"
161 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"PortugueseBRExtra.nsh" ${VLC_LANGFILE_FALLBACK}
162 !insertmacro MUI_LANGUAGE
"Welsh"
163 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"WelshExtra.nsh" ${VLC_LANGFILE_FALLBACK}
164 !insertmacro MUI_LANGUAGE
"Uzbek"
165 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"UzbekExtra.nsh" ${VLC_LANGFILE_FALLBACK}
166 !insertmacro MUI_LANGUAGE
"Ukrainian"
167 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"UkrainianExtra.nsh" ${VLC_LANGFILE_FALLBACK}
168 !insertmacro MUI_LANGUAGE
"Turkish"
169 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"TurkishExtra.nsh" ${VLC_LANGFILE_FALLBACK}
170 !insertmacro MUI_LANGUAGE
"Thai"
171 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"ThaiExtra.nsh" ${VLC_LANGFILE_FALLBACK}
172 !insertmacro MUI_LANGUAGE
"Norwegian"
173 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"NorwegianExtra.nsh" ${VLC_LANGFILE_FALLBACK}
174 !insertmacro MUI_LANGUAGE
"Malay"
175 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"MalayExtra.nsh" ${VLC_LANGFILE_FALLBACK}
176 !insertmacro MUI_LANGUAGE
"Korean"
177 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"KoreanExtra.nsh" ${VLC_LANGFILE_FALLBACK}
178 !insertmacro MUI_LANGUAGE
"Greek"
179 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"GreekExtra.nsh" ${VLC_LANGFILE_FALLBACK}
180 !insertmacro MUI_LANGUAGE
"Czech"
181 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"CzechExtra.nsh" ${VLC_LANGFILE_FALLBACK}
182 !insertmacro MUI_LANGUAGE
"Bosnian"
183 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"BosnianExtra.nsh" ${VLC_LANGFILE_FALLBACK}
184 !insertmacro MUI_LANGUAGE
"Arabic"
185 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"ArabicExtra.nsh" ${VLC_LANGFILE_FALLBACK}
186 !insertmacro MUI_LANGUAGE
"Polish"
187 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"PolishExtra.nsh" ${VLC_LANGFILE_FALLBACK}
188 !insertmacro MUI_LANGUAGE
"Romanian"
189 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"RomanianExtra.nsh" ${VLC_LANGFILE_FALLBACK}
190 !insertmacro MUI_LANGUAGE
"Slovak"
191 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"SlovakExtra.nsh" ${VLC_LANGFILE_FALLBACK}
192 !insertmacro MUI_LANGUAGE
"Serbian"
193 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"SerbianExtra.nsh" ${VLC_LANGFILE_FALLBACK}
194 !insertmacro MUI_LANGUAGE
"Hungarian"
195 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"HungarianExtra.nsh" ${VLC_LANGFILE_FALLBACK}
196 !insertmacro MUI_LANGUAGE
"Catalan"
197 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"CatalanExtra.nsh" ${VLC_LANGFILE_FALLBACK}
198 !insertmacro MUI_LANGUAGE
"Bulgarian"
199 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"BulgarianExtra.nsh" ${VLC_LANGFILE_FALLBACK}
200 !insertmacro MUI_LANGUAGE
"Estonian"
201 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"EstonianExtra.nsh" ${VLC_LANGFILE_FALLBACK}
202 !insertmacro MUI_LANGUAGE
"Lithuanian"
203 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"LithuanianExtra.nsh" ${VLC_LANGFILE_FALLBACK}
204 !insertmacro MUI_LANGUAGE
"Basque"
205 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"BasqueExtra.nsh" ${VLC_LANGFILE_FALLBACK}
206 !insertmacro MUI_LANGUAGE
"Galician"
207 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"GalicianExtra.nsh" ${VLC_LANGFILE_FALLBACK}
208 !insertmacro MUI_LANGUAGE
"Hebrew"
209 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"HebrewExtra.nsh" ${VLC_LANGFILE_FALLBACK}
210 !insertmacro MUI_LANGUAGE
"Slovenian"
211 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"SlovenianExtra.nsh" ${VLC_LANGFILE_FALLBACK}
212 !insertmacro MUI_LANGUAGE
"Afrikaans"
213 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"AfrikaansExtra.nsh" ${VLC_LANGFILE_FALLBACK}
214 !insertmacro MUI_LANGUAGE
"Albanian"
215 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"AlbanianExtra.nsh" ${VLC_LANGFILE_FALLBACK}
216 !insertmacro MUI_LANGUAGE
"Croatian"
217 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"CroatianExtra.nsh" ${VLC_LANGFILE_FALLBACK}
218 !insertmacro MUI_LANGUAGE
"Icelandic"
219 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"IcelandicExtra.nsh" ${VLC_LANGFILE_FALLBACK}
220 !insertmacro MUI_LANGUAGE
"Latvian"
221 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"LatvianExtra.nsh" ${VLC_LANGFILE_FALLBACK}
222 !insertmacro MUI_LANGUAGE
"Indonesian"
223 !insertmacro LANGFILE_INCLUDE_WITHDEFAULT
"IndonesianExtra.nsh" ${VLC_LANGFILE_FALLBACK}
225 ; Missing upstream translations:
227 ; !insertmacro MUI_LANGUAGE "Sinhala"
228 ; !insertmacro LANGFILE_INCLUDE_WITHDEFAULT "SinhalaExtra.nsh"
229 ; !insertmacro MUI_LANGUAGE "EnglishUK"
230 ; !insertmacro LANGFILE_INCLUDE_WITHDEFAULT "EnglishUKExtra.nsh"
232 ; Upstream files broken:
233 ; !insertmacro MUI_LANGUAGE "Khmer"
234 ; !insertmacro LANGFILE_INCLUDE_WITHDEFAULT "KhmerExtra.nsh"
235 ; !insertmacro MUI_LANGUAGE "ScotsGaelic"
236 ; !insertmacro LANGFILE_INCLUDE_WITHDEFAULT "ScotsGaelicExtra.nsh"
238 ; Reserve files for solid compression
239 !insertmacro MUI_RESERVEFILE_LANGDLL
241 ;;;;;;;;;;;;;;;;;;;;;;;
242 ; Macro and Functions ;
243 ;;;;;;;;;;;;;;;;;;;;;;;
245 !include helpers\extensions
.nsh
246 !include helpers\install
.nsh
247 !include helpers\utils
.nsh
249 ;;;;;;;;;;;;;;;;;;;;;;
250 ; Installer sections ;
253 ;;;;;;;;;;;;;;;;;;;;;;
255 ${MementoSection} "$(Name_Section01)" SEC01
257 SetShellVarContext all
258 SetOutPath "$INSTDIR"
260 DetailPrint "$(Detail_CheckProcesses)"
261 Call CheckRunningProcesses
263 ; Remove 32 bit version first
264 !ifdef VLC_64BIT_INSTALLER
265 ${If} $32bitPath !=
""
268 ExecWait '"$32bitUninstaller" /S _?=$32bitPath'
270 ; If uninstall was not successfull, do not continue.
271 ; This happens for example if the user cancels the uninstaller.
273 Goto skip_uninstall32_cleanup
276 ${If} ${FileExists} "$32bitUninstaller"
277 Delete "$32bitUninstaller"
283 skip_uninstall32_cleanup:
285 ; Remove previous version first, if this is update
286 ${If} $ReinstallType ==
"1"
287 FileOpen $UninstallLog "$INSTDIR\uninstall.log" r
290 FileRead $UninstallLog $R0
291 IfErrors UninstallEnd
295 Delete "$INSTDIR\$R0"
298 FileClose $UninstallLog
299 Delete "$INSTDIR\uninstall.log"
300 Delete "$INSTDIR\uninstall.exe"
305 !insertmacro OpenUninstallLog
307 ; VLC.exe, libvlc.dll
308 !insertmacro InstallFile vlc
.exe
309 !insertmacro InstallFile vlc
-cache
-gen
.exe
312 !insertmacro InstallFile
*.dll
315 !insertmacro InstallFile
*.txt
318 !insertmacro InstallFolder plugins
319 !insertmacro InstallFolderOptional locale
320 !insertmacro InstallFolder hrtfs
321 @BUILD_SKINS_TRUE@
!insertmacro InstallFolder skins
322 @BUILD_LUA_TRUE@
!insertmacro InstallFolder lua
324 ; Generate the cache and add it to uninstall.log
325 nsExec::ExecToStack
'"$INSTDIR\vlc-cache-gen.exe" $INSTDIR\plugins'
326 FindFirst $0 $1 "$INSTDIR\plugins\*.dat"
327 FileWrite $UninstallLog "plugins\$1$\r$\n"
332 WriteIniStr
"$INSTDIR\${PRODUCT_GROUP} Website.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
333 FileWrite $UninstallLog "${PRODUCT_GROUP} Website.url$\r$\n"
334 WriteIniStr
"$INSTDIR\Documentation.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}/doc/"
335 FileWrite $UninstallLog "Documentation.url$\r$\n"
336 WriteIniStr
"$INSTDIR\New_Skins.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}/vlc/skins.php"
337 FileWrite $UninstallLog "New_Skins.url$\r$\n"
339 !insertmacro CloseUninstallLog
341 ; Add VLC to "recommended programs" for the following extensions
342 WriteRegStr HKCR Applications\vlc
.exe
"" ""
343 WriteRegStr HKCR Applications\vlc
.exe
"FriendlyAppName" "VLC media player"
344 WriteRegStr HKCR Applications\vlc
.exe\shell\Open
"" "$(ContextMenuEntry_PlayWith)"
345 WriteRegStr HKCR Applications\vlc
.exe\shell\Open\command
"" '"$INSTDIR\vlc.exe" --started-from-file "%1"'
346 !insertmacro MacroAllExtensions RegisterExtensionMacro
347 !insertmacro MacroSkinExtensions RegisterSkinExtensionMacro
349 ; Add VLC to "App Paths" to run VLC from ShellExecute/ShellExecuteEx/run dialog without giving a full path
350 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\vlc.exe" "" "$INSTDIR\vlc.exe"
351 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\vlc.exe" "Path" "$INSTDIR"
353 ; Windows default programs Registration
354 ; Vista and above detection
355 ${If} ${AtLeastWinVista}
356 WriteRegStr HKLM "Software\RegisteredApplications" "VLC" "Software\Clients\Media\VLC\Capabilities"
357 WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationName" "VLC media player"
358 WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationDescription" "VLC - The video swiss knife"
359 WriteRegStr HKLM "Software\Clients\Media\VLC" "" "VLC media player"
360 WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "HideIconsCommand" "$\"$INSTDIR\spad
-setup
.exe
$\
" /HideIcons /S"
361 WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "ShowIconsCommand" "$\"$INSTDIR\spad
-setup
.exe
$\
" /ShowIcons /S"
362 WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "ReinstallCommand" "$\"$INSTDIR\spad
-setup
.exe
$\
" /Reinstall /S"
363 WriteRegDWORD HKLM "Software\Clients\Media\VLC\InstallInfo" "IconsVisible" 0x001
367 ${MementoSection} "$(Name_Section02a)" SEC02a
369 CreateDirectory "$SMPROGRAMS\VideoLAN"
370 CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player.lnk" \
371 "$INSTDIR\vlc.exe" ""
372 CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player skinned.lnk" \
373 "$INSTDIR\vlc.exe" "-Iskins"
374 CreateShortCut "$SMPROGRAMS\VideoLAN\Documentation.lnk" \
375 "$INSTDIR\Documentation.url"
376 CreateShortCut "$SMPROGRAMS\VideoLAN\Release Notes.lnk" \
377 "$INSTDIR\NEWS.txt" ""
378 CreateShortCut "$SMPROGRAMS\VideoLAN\${PRODUCT_GROUP} Website.lnk" \
379 "$INSTDIR\${PRODUCT_GROUP} Website.url"
380 CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player - reset preferences and cache files.lnk" \
381 "$INSTDIR\vlc.exe" "--reset-config --reset-plugins-cache vlc://quit"
384 ${MementoSection} "$(Name_Section02b)" SEC02b
386 CreateShortCut "$DESKTOP\VLC media player.lnk" \
387 "$INSTDIR\vlc.exe" ""
390 SectionGroup
/e
"!$(Name_Section34)"
392 !ifdef INSTALL_ACTIVEX
393 ${MementoSection} "$(Name_Section04)" SEC04
396 SetOutPath "$INSTDIR"
397 !insertmacro OpenUninstallLog
398 !insertmacro InstallFile axvlc
.dll
399 !insertmacro CloseUninstallLog
400 @HAVE_WIN64_FALSE@
RegDLL "$INSTDIR\axvlc.dll"
401 @HAVE_WIN64_TRUE@
ExecWait 'regsvr32.exe /s "$INSTDIR\axvlc.dll"'
407 ${MementoSection} "$(Name_Section05)" SEC05
409 WriteRegStr HKCR "AudioCD\shell\PlayWithVLC" "" "$(ContextMenuEntry_PlayWith)"
410 WriteRegStr HKCR "AudioCD\shell\PlayWithVLC\command" "" \
411 '"$INSTDIR\vlc.exe" --started-from-file cdda:///%1'
412 WriteRegStr HKCR "DVD\shell\PlayWithVLC" "" "$(ContextMenuEntry_PlayWith)"
413 WriteRegStr HKCR "DVD\shell\PlayWithVLC\command" "" \
414 '"$INSTDIR\vlc.exe" --started-from-file dvd:///%1'
416 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival" ""
417 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Action" "$(Action_OnArrivalDVD)"
418 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
419 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeProgID" "VLC.DVDMovie"
420 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeVerb" "Open"
421 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Provider" "VideoLAN VLC media player"
423 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival" ""
424 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Action" "$(Action_OnArrivalAudioCD)"
425 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
426 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeProgID" "VLC.CDAudio"
427 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeVerb" "Open"
428 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Provider" "VideoLAN VLC media player"
430 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoCDMovieOnArrival" "VLCPlayVCDMovieOnArrival" ""
431 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "Action" "$(Action_OnArrivalVCDMovie)"
432 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
433 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "InvokeProgID" "VLC.VCDMovie"
434 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "InvokeVerb" "Open"
435 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "Provider" "VideoLAN VLC media player"
437 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlaySuperVideoCDMovieOnArrival" "VLCPlaySVCDMovieOnArrival" ""
438 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "Action" "$(Action_OnArrivalSVCDMovie)"
439 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
440 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "InvokeProgID" "VLC.SVCDMovie"
441 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "InvokeVerb" "Open"
442 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "Provider" "VideoLAN VLC media player"
444 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDAudioOnArrival" "VLCPlayDVDAudioOnArrival" ""
445 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "Action" "$(Action_OnArrivalDVDAudio)"
446 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
447 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "InvokeProgID" "VLC.OPENFolder"
448 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "InvokeVerb" "Open"
449 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "Provider" "VideoLAN VLC media player"
451 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoFilesOnArrival" "VLCPlayVideoFilesOnArrival" ""
452 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "Action" "$(Action_OnArrivalVideoFiles)"
453 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
454 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "InvokeProgID" "VLC.OPENFolder"
455 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "InvokeVerb" "Open"
456 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "Provider" "VideoLAN VLC media player"
458 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayMusicFilesOnArrival" "VLCPlayMusicFilesOnArrival" ""
459 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "Action" "$(Action_OnArrivalMusicFiles)"
460 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
461 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "InvokeProgID" "VLC.OPENFolder"
462 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "InvokeVerb" "Open"
463 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "Provider" "VideoLAN VLC media player"
465 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayBlurayOnArrival" "VLCPlayBlurayOnArrival" ""
466 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayBlurayOnArrival" "Action" "$(Action_OnArrivalBluray)"
467 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayBlurayOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
468 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayBlurayOnArrival" "InvokeProgID" "VLC.Bluray"
469 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayBlurayOnArrival" "InvokeVerb" "Open"
470 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayBlurayOnArrival" "Provider" "VideoLAN VLC media player"
472 WriteRegStr HKCR "VLC.DVDMovie" "" "VLC DVD Movie"
473 WriteRegStr HKCR "VLC.DVDMovie\shell" "" "Open"
474 WriteRegStr HKCR "VLC.DVDMovie\shell\Open\command" "" \
475 '"$INSTDIR\vlc.exe" --started-from-file dvd:///%1'
476 WriteRegStr HKCR "VLC.DVDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
478 WriteRegStr HKCR "VLC.CDAudio" "" "VLC CD Audio"
479 WriteRegStr HKCR "VLC.CDAudio\shell" "" "Open"
480 WriteRegStr HKCR "VLC.CDAudio\shell\Open\command" "" \
481 '"$INSTDIR\vlc.exe" --started-from-file cdda:///%1'
482 WriteRegStr HKCR "VLC.CDAudio\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
484 WriteRegStr HKCR "VLC.VCDMovie" "" "VLC VCD Movie"
485 WriteRegStr HKCR "VLC.VCDMovie\shell" "" "Open"
486 WriteRegStr HKCR "VLC.VCDMovie\shell\Open\command" "" \
487 '"$INSTDIR\vlc.exe" --started-from-file vcd:///%1'
488 WriteRegStr HKCR "VLC.VCDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
490 WriteRegStr HKCR "VLC.SVCDMovie" "" "VLC SVCD Movie"
491 WriteRegStr HKCR "VLC.SVCDMovie\shell" "" "Open"
492 WriteRegStr HKCR "VLC.SVCDMovie\shell\Open\command" "" \
493 '"$INSTDIR\vlc.exe" --started-from-file vcd:///%1'
494 WriteRegStr HKCR "VLC.SVCDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
496 WriteRegStr HKCR "VLC.OPENFolder" "" "VLC Play content"
497 WriteRegStr HKCR "VLC.OPENFolder\shell" "" "Open"
498 WriteRegStr HKCR "VLC.OPENFolder\shell\Open\command" "" \
499 '"$INSTDIR\vlc.exe" %1'
500 WriteRegStr HKCR "VLC.OPENFolder\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
502 WriteRegStr HKCR "VLC.Bluray" "" "VLC Bluray"
503 WriteRegStr HKCR "VLC.Bluray\shell" "" "Open"
504 WriteRegStr HKCR "VLC.Bluray\shell\Open\command" "" \
505 '"$INSTDIR\vlc.exe" --started-from-file bluray:///%1'
506 WriteRegStr HKCR "VLC.Bluray\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
511 SectionGroup
/e
"!$(Name_Section06)" SEC06
512 SectionGroup
"$(Name_SectionGroupAudio)"
513 !insertmacro MacroAudioExtensions AssociateExtensionSection
515 SectionGroup
"$(Name_SectionGroupVideo)"
516 !insertmacro MacroVideoExtensions AssociateExtensionSection
518 SectionGroup
"$(Name_SectionGroupOther)"
519 !insertmacro MacroOtherExtensions AssociateExtensionSection
520 !insertmacro MacroSkinExtensions AssociateSkinExtensionSection
521 !insertmacro MacroUnassociatedExtensions AssociateExtensionUnselectedSection
525 ${MementoSection} "$(Name_Section07)" SEC07
527 !insertmacro MacroAllExtensions AddContextMenu
528 !insertmacro AddContextMenuExt
"Directory"
531 ${MementoUnselectedSection} "$(Name_Section08)" SEC08
532 !insertmacro delprefs
535 ${MementoSectionDone}
537 ; Installer section descriptions
538 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
539 !insertmacro MUI_DESCRIPTION_TEXT
${SEC01} "$(Desc_Section01)"
540 !insertmacro MUI_DESCRIPTION_TEXT
${SEC02a} "$(Desc_Section02a)"
541 !insertmacro MUI_DESCRIPTION_TEXT
${SEC02b} "$(Desc_Section02b)"
542 !ifdef INSTALL_MOZILLA
543 !insertmacro MUI_DESCRIPTION_TEXT
${SEC03} "$(Desc_Section03)"
545 !ifdef INSTALL_ACTIVEX
546 !insertmacro MUI_DESCRIPTION_TEXT
${SEC04} "$(Desc_Section04)"
548 !insertmacro MUI_DESCRIPTION_TEXT
${SEC05} "$(Desc_Section05)"
549 !insertmacro MUI_DESCRIPTION_TEXT
${SEC06} "$(Desc_Section06)"
550 !insertmacro MUI_DESCRIPTION_TEXT
${SEC07} "$(Desc_Section07)"
551 !insertmacro MUI_DESCRIPTION_TEXT
${SEC08} "$(Desc_Section08)"
552 !insertmacro MUI_FUNCTION_DESCRIPTION_END
557 @HAVE_WIN64_TRUE@ SetRegView
64
559 ${MementoSectionRestore}
561 @HAVE_WIN64_TRUE@
!include "x64.nsh"
562 @HAVE_WIN64_TRUE@
${Unless} ${RunningX64}
563 @HAVE_WIN64_TRUE@
MessageBox MB_OK|
MB_ICONSTOP "This version of VLC only runs on 64-bit operating systems.$\nPlease get the 32-bit version and try again."
564 @HAVE_WIN64_TRUE@
Quit
565 @HAVE_WIN64_TRUE@
${EndUnless}
566 ${If} ${AtLeastWinXP}
568 ${AndIf} ${AtMostServicePack} 1
575 ReadRegStr $INSTDIR HKLM "${PRODUCT_DIR_REGKEY}" "InstallDir"
576 StrCmp $INSTDIR "" 0 WinOk
577 StrCpy $INSTDIR "$@PROGRAMFILES@\VideoLAN\VLC"
581 MessageBox MB_OK|
MB_ICONSTOP "This version of VLC only runs on Windows XP SP2 and newer."
586 Call ParseCommandline
588 ; See if a other bitness VLC version exists
589 !ifdef VLC_64BIT_INSTALLER
592 Call ReadPreviousVersion
594 ${If} $PreviousVersion !=
""
595 ReadRegStr $32bitUninstaller ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString"
596 ReadRegStr $32bitPath ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "InstallLocation"
597 StrCpy $PreviousVersion ""
603 ; See if previous version exists
604 Call ReadPreviousVersion
606 ${If} $PreviousVersion ==
""
607 StrCpy $PerformUpdate 0
610 Push $PreviousVersion
613 ${If} $PreviousVersionState !=
"newer"
614 StrCpy $PerformUpdate 0
618 !insertmacro MUI_LANGDLL_DISPLAY
622 ;;; Page to upgrade / downgrade or customize the installation
623 Function PageReinstall
624 ${If} $PreviousVersion ==
""
628 ${If} $PerformUpdate ==
1
629 StrCpy $ReinstallType 1
633 nsDialogs::Create
/NOUNLOAD
1018
636 ${If} $PreviousVersionState ==
"newer"
638 !insertmacro MUI_HEADER_TEXT
"$(Reinstall_Headline)" "$(Reinstall_HeadlineInstall)"
639 nsDialogs::CreateItem
/NOUNLOAD STATIC
${WS_VISIBLE}|
${WS_CHILD}|
${WS_CLIPSIBLINGS} 0 0 0 100% 40 "$(Reinstall_MessageOlder)"
641 nsDialogs::CreateItem
/NOUNLOAD BUTTON
${BS_AUTORADIOBUTTON}|
${BS_VCENTER}|
${BS_MULTILINE}|
${WS_VISIBLE}|
${WS_CHILD}|
${WS_CLIPSIBLINGS}|
${WS_GROUP}|
${WS_TABSTOP} 0 10 55 100% 30 "$(Reinstall_OptionUpgrade)"
642 Pop $ReinstallUninstallBtn
643 nsDialogs::CreateItem
/NOUNLOAD BUTTON
${BS_AUTORADIOBUTTON}|
${BS_TOP}|
${BS_MULTILINE}|
${WS_VISIBLE}|
${WS_CHILD}|
${WS_CLIPSIBLINGS} 0 10 85 100% 50 "$(Reinstall_OptionAdvanced)"
646 ${If} $ReinstallType ==
""
647 StrCpy $ReinstallType 1
650 ${ElseIf} $PreviousVersionState ==
"older"
652 !insertmacro MUI_HEADER_TEXT
"$(Reinstall_Headline)" "$(Reinstall_HeadlineInstall)"
653 nsDialogs::CreateItem
/NOUNLOAD STATIC
${WS_VISIBLE}|
${WS_CHILD}|
${WS_CLIPSIBLINGS} 0 0 0 100% 40 "$(Reinstall_MessageNewer)"
655 nsDialogs::CreateItem
/NOUNLOAD BUTTON
${BS_AUTORADIOBUTTON}|
${BS_VCENTER}|
${BS_MULTILINE}|
${WS_VISIBLE}|
${WS_CHILD}|
${WS_CLIPSIBLINGS}|
${WS_GROUP}|
${WS_TABSTOP} 0 10 55 100% 30 "$(Reinstall_OptionDowngrade)"
656 Pop $ReinstallUninstallBtn
657 nsDialogs::CreateItem
/NOUNLOAD BUTTON
${BS_AUTORADIOBUTTON}|
${BS_TOP}|
${BS_MULTILINE}|
${WS_VISIBLE}|
${WS_CHILD}|
${WS_CLIPSIBLINGS} 0 10 85 100% 50 "$(Reinstall_OptionAdvanced)"
660 ${If} $ReinstallType ==
""
661 StrCpy $ReinstallType 1
664 ${ElseIf} $PreviousVersionState ==
"same"
666 !insertmacro MUI_HEADER_TEXT
"$(Reinstall_Headline)" "$(Reinstall_HeadlineMaintenance)"
667 nsDialogs::CreateItem
/NOUNLOAD STATIC
${WS_VISIBLE}|
${WS_CHILD}|
${WS_CLIPSIBLINGS} 0 0 0 100% 40 "$(Reinstall_MessageSame)"
669 nsDialogs::CreateItem
/NOUNLOAD BUTTON
${BS_AUTORADIOBUTTON}|
${BS_VCENTER}|
${BS_MULTILINE}|
${WS_VISIBLE}|
${WS_CHILD}|
${WS_CLIPSIBLINGS}|
${WS_GROUP}|
${WS_TABSTOP} 0 10 55 100% 30 "$(Reinstall_OptionComponents)"
671 nsDialogs::CreateItem
/NOUNLOAD BUTTON
${BS_AUTORADIOBUTTON}|
${BS_TOP}|
${BS_MULTILINE}|
${WS_VISIBLE}|
${WS_CHILD}|
${WS_CLIPSIBLINGS} 0 10 85 100% 50 "$(Reinstall_OptionUninstall)"
672 Pop $ReinstallUninstallBtn
674 ${If} $ReinstallType ==
""
675 StrCpy $ReinstallType 2
680 MessageBox MB_ICONSTOP "Unknown value of PreviousVersionState, aborting" /SD
IDOK
685 ${If} $ReinstallType ==
"1"
686 SendMessage $ReinstallUninstallBtn ${BM_SETCHECK} 1 0
688 SendMessage $R0 ${BM_SETCHECK} 1 0
695 Function PageLeaveReinstall
697 SendMessage $ReinstallUninstallBtn ${BM_GETCHECK} 0 0 $R0
699 ; Option to uninstall old version selected
700 StrCpy $ReinstallType 1
702 ; Custom up/downgrade or add/remove/reinstall
703 StrCpy $ReinstallType 2
706 ${If} $ReinstallType ==
1
708 ${If} $PreviousVersionState ==
"same"
719 Function RunUninstaller
720 ReadRegStr $R1 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString"
729 ExecWait '"$R1" _?=$INSTDIR'
731 IfErrors no_remove_uninstaller
733 IfFileExists "$INSTDIR\uninstall.exe" 0 no_remove_uninstaller
737 no_remove_uninstaller:
741 ${If} $PerformUpdate ==
1
743 ${ElseIf} $PreviousVersion !=
""
748 ;;; Used during upgrade to skip most pages
749 Function PageFastUpdatePre
750 ${If} $PerformUpdate ==
1
755 Function PageComponentsPre
757 ReadRegStr $0 ${MEMENTO_REGISTRY_ROOT} `${MEMENTO_REGISTRY_KEY}` MementoSectionUsed
758 ; Backward compatibility:
759 ; Don't skip the components page until Memento was able to save the user choices.
762 ${If} $ReinstallType ==
1
769 Function PageDirectoryPre
770 ${If} $ReinstallType !=
""
775 Function .OnInstSuccess
776 ${MementoSectionSave}
781 WriteUninstaller "$INSTDIR\uninstall.exe"
782 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "InstallDir" $INSTDIR
783 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "Version" "${VERSION}"
784 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\vlc.exe"
786 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
787 "DisplayName" "$(^Name)"
788 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
789 "UninstallString" "$\"$INSTDIR\uninstall
.exe
$\
""
790 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
791 "InstallLocation" "$INSTDIR"
792 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
793 "DisplayIcon" "$INSTDIR\vlc.exe"
794 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
795 "DisplayVersion" "${PRODUCT_VERSION}"
796 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
797 "URLInfoAbout" "${PRODUCT_WEB_SITE}"
798 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
799 "Publisher" "${PRODUCT_PUBLISHER}"
800 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
801 "VersionMajor" "@VERSION_MAJOR@"
802 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
803 "VersionMinor" "@VERSION_MINOR@"
806 ;;;;;;;;;;;;;;;;;;;;;;;;
807 ; Uninstaller sections ;
808 ;;;;;;;;;;;;;;;;;;;;;;;;
810 Section "un.$(Name_Section91)" SEC91
812 SetShellVarContext all
814 !insertmacro MacroAllExtensions DeleteContextMenu
815 !insertmacro MacroAllExtensions UnRegisterExtensionSection
816 !insertmacro MacroSkinExtensions UnRegisterExtensionSection
817 !insertmacro DeleteContextMenuExt
"Directory"
819 ;remove activex plugin
820 @HAVE_WIN64_FALSE@
UnRegDLL "$INSTDIR\axvlc.dll"
821 @HAVE_WIN64_TRUE@
ExecWait 'regsvr32.exe /s /u "$INSTDIR\axvlc.dll"'
822 Delete /REBOOTOK
"$INSTDIR\axvlc.dll"
824 ;remove mozilla plugin
829 !define Index
'Line${__LINE__}'
835 EnumRegKey $R0 HKLM "SOFTWARE\Mozilla" "$R1"
836 StrCmp $R0 "" "${Index}-End"
838 ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins"
839 StrCmp $R2 "" "${Index}-Loop" ""
841 ; old files (0.8.5 and before) that may be lying around
842 Delete /REBOOTOK
"$R2\npvlc.dll"
843 Delete /REBOOTOK
"$R2\libvlc.dll"
844 Delete /REBOOTOK
"$R2\vlcintf.xpt"
849 Delete /REBOOTOK
"$INSTDIR\npvlc.dll"
851 RMDir "$SMPROGRAMS\VideoLAN"
852 RMDir /r
$SMPROGRAMS\VideoLAN
854 FileOpen $UninstallLog "$INSTDIR\uninstall.log" r
857 FileRead $UninstallLog $R0
858 IfErrors UninstallEnd
862 Delete "$INSTDIR\$R0"
865 FileClose $UninstallLog
866 Delete "$INSTDIR\uninstall.log"
867 Delete "$INSTDIR\uninstall.exe"
869 Call un
.RemoveEmptyDirs
872 DeleteRegKey HKLM Software\VideoLAN
874 DeleteRegKey HKCR Applications\vlc
.exe
875 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\vlc.exe"
876 DeleteRegKey HKCR AudioCD\shell\PlayWithVLC
877 DeleteRegKey HKCR DVD\shell\PlayWithVLC
878 DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival"
879 DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival
880 DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival"
881 DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival
882 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoCDMovieOnArrival" "VLCPlayVCDMovieOnArrival"
883 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival
884 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlaySuperVideoCDMovieOnArrival" "VLCPlaySVCDMovieOnArrival"
885 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival
886 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDAudioOnArrival" "VLCPlayDVDAudioOnArrival"
887 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival
888 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoFilesOnArrival" "VLCPlayVideoFilesOnArrival"
889 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival
890 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayMusicFilesOnArrival" "VLCPlayMusicFilesOnArrival"
891 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival
893 DeleteRegKey HKLM Software\Clients\Media\VLC
894 DeleteRegValue HKLM "Software\RegisteredApplications" "VLC"
895 DeleteRegKey HKCR "VLC.MediaFile"
896 DeleteRegKey HKCR "VLC.DVDMovie"
897 DeleteRegKey HKCR "VLC.CDAudio"
898 DeleteRegKey HKCR "VLC.VCDMovie"
899 DeleteRegKey HKCR "VLC.SVCDMovie"
900 DeleteRegKey HKCR "VLC.OPENFolder"
901 DeleteRegKey HKCR "VLC.Bluray"
905 "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}"
908 "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
910 Delete "$DESKTOP\VLC media player.lnk"
912 DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
913 DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
917 Section /o
"un.$(Name_Section92)" SEC92
918 !insertmacro delprefs
921 ; Uninstaller section descriptions
922 !insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
923 !insertmacro MUI_DESCRIPTION_TEXT
${SEC91} "$(Desc_Section91)"
924 !insertmacro MUI_DESCRIPTION_TEXT
${SEC92} "$(Desc_Section92)"
925 !insertmacro MUI_UNFUNCTION_DESCRIPTION_END
929 @HAVE_WIN64_TRUE@ SetRegView
64
931 !insertmacro MUI_UNGETLANGUAGE