]> git.sesse.net Git - vlc/blob - vlc.win32.nsi
select first moved item instead of the last one after a drag and drop.
[vlc] / vlc.win32.nsi
1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
2 ; NSIS installer script for vlc ;\r
3 ; (http://nsis.sourceforge.net) ;\r
4 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
5 \r
6 !define PRODUCT_NAME "VLC media player"\r
7 !define PRODUCT_VERSION '${VERSION}'\r
8 !define PRODUCT_GROUP "VideoLAN"\r
9 !define PRODUCT_PUBLISHER "VideoLAN Team"\r
10 !define PRODUCT_WEB_SITE "http://www.videolan.org"\r
11 !define PRODUCT_DIR_REGKEY "Software\VideoLAN\VLC"\r
12 !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"\r
13 !define PRODUCT_UNINST_ROOT_KEY "HKLM"\r
14 !define PRODUCT_ID "{ea92ef52-afe4-4212-bacb-dfe9fca94cd6}"\r
15 \r
16 ;;;;;;;;;;;;;;;;;;;;;;;;;\r
17 ; General configuration ;\r
18 ;;;;;;;;;;;;;;;;;;;;;;;;;\r
19 \r
20 Name "${PRODUCT_GROUP} ${PRODUCT_NAME} ${PRODUCT_VERSION}"\r
21 OutFile ..\vlc-${VERSION}-win32.exe\r
22 InstallDir "$PROGRAMFILES\VideoLAN\VLC"\r
23 InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" "Install_Dir"\r
24 SetCompressor lzma\r
25 ShowInstDetails show\r
26 ShowUnInstDetails show\r
27 SetOverwrite ifnewer\r
28 CRCCheck on\r
29 \r
30 InstType "Normal"\r
31 InstType "Full"\r
32 \r
33 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
34 ; NSIS Modern User Interface configuration ;\r
35 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
36 \r
37 ; MUI 1.67 compatible ------\r
38 !include "MUI.nsh"\r
39 \r
40 ; MUI Settings\r
41 !define MUI_ABORTWARNING\r
42 !define MUI_ICON "vlc48x48new.ico"\r
43 !define MUI_UNICON "vlc48x48new.ico"\r
44 !define MUI_COMPONENTSPAGE_SMALLDESC\r
45 \r
46 ; Welcome page\r
47 !insertmacro MUI_PAGE_WELCOME\r
48 ; License page\r
49 !insertmacro MUI_PAGE_LICENSE "COPYING.txt"\r
50 ; Components page\r
51 !insertmacro MUI_PAGE_COMPONENTS\r
52 ; Directory page\r
53 !insertmacro MUI_PAGE_DIRECTORY\r
54 ; Instfiles page\r
55 !insertmacro MUI_PAGE_INSTFILES\r
56 ; Finish page\r
57 !define MUI_FINISHPAGE_RUN "$INSTDIR\vlc.exe"\r
58 !define MUI_FINISHPAGE_NOREBOOTSUPPORT\r
59 !insertmacro MUI_PAGE_FINISH\r
60 \r
61 ; Uninstaller pages\r
62 !insertmacro MUI_UNPAGE_INSTFILES\r
63 \r
64 ; Language files\r
65 !insertmacro MUI_LANGUAGE "English"\r
66 \r
67 ; Reserve files\r
68 !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS\r
69 \r
70 ; MUI end ------\r
71 \r
72 \r
73 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
74 ; Push extensions on stack ;\r
75 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
76 !macro MacroAudioExtensions _action\r
77   !insertmacro ${_action} ".a52"\r
78   !insertmacro ${_action} ".aac"\r
79   !insertmacro ${_action} ".ac3"\r
80   !insertmacro ${_action} ".dts"\r
81   !insertmacro ${_action} ".flac"\r
82   !insertmacro ${_action} ".mka"\r
83   !insertmacro ${_action} ".mp1"\r
84   !insertmacro ${_action} ".mp2"\r
85   !insertmacro ${_action} ".mp3"\r
86   !insertmacro ${_action} ".ogg"\r
87   !insertmacro ${_action} ".spx"\r
88   !insertmacro ${_action} ".wav"\r
89   !insertmacro ${_action} ".wma"\r
90 !macroend\r
91 \r
92 !macro MacroVideoExtensions _action\r
93   !insertmacro ${_action} ".asf"\r
94   !insertmacro ${_action} ".avi"\r
95   !insertmacro ${_action} ".divx"\r
96   !insertmacro ${_action} ".dv"\r
97   !insertmacro ${_action} ".m1v"\r
98   !insertmacro ${_action} ".m2v"\r
99   !insertmacro ${_action} ".mkv"\r
100   !insertmacro ${_action} ".mov"\r
101   !insertmacro ${_action} ".mp4"\r
102   !insertmacro ${_action} ".mpeg"\r
103   !insertmacro ${_action} ".mpeg1"\r
104   !insertmacro ${_action} ".mpeg2"\r
105   !insertmacro ${_action} ".mpeg4"\r
106   !insertmacro ${_action} ".mpg"\r
107   !insertmacro ${_action} ".ps"\r
108   !insertmacro ${_action} ".ts"\r
109   !insertmacro ${_action} ".ogm"\r
110   !insertmacro ${_action} ".vob"\r
111   !insertmacro ${_action} ".wmv"\r
112 !macroend\r
113 \r
114 !macro MacroOtherExtensions _action\r
115   !insertmacro ${_action} ".asx"\r
116   !insertmacro ${_action} ".bin"\r
117   !insertmacro ${_action} ".cue"\r
118   !insertmacro ${_action} ".m3u"\r
119   !insertmacro ${_action} ".pls"\r
120   !insertmacro ${_action} ".vlc"\r
121 !macroend\r
122 \r
123 !macro MacroAllExtensions _action\r
124   !insertmacro MacroAudioExtensions ${_action}\r
125   !insertmacro MacroVideoExtensions ${_action}\r
126   !insertmacro MacroOtherExtensions ${_action}\r
127 !macroend\r
128 \r
129 ;;;;;;;;;;;;;;;;;;;;;;;;;;\r
130 ; File type associations ;\r
131 ;;;;;;;;;;;;;;;;;;;;;;;;;;\r
132 \r
133 Function RegisterExtension\r
134   ; back up old value for extension $R0 (eg. ".opt")\r
135   ReadRegStr $1 HKCR "$R0" ""\r
136   StrCmp $1 "" NoBackup\r
137     StrCmp $1 "VLC$R0" "NoBackup"\r
138     WriteRegStr HKCR "$R0" "VLC.backup" $1\r
139 NoBackup:\r
140   WriteRegStr HKCR "$R0" "" "VLC$R0"\r
141   ReadRegStr $0 HKCR "VLC$R0" ""\r
142   WriteRegStr HKCR "VLC$R0" "" "VLC media file"\r
143   WriteRegStr HKCR "VLC$R0\shell" "" "Play"\r
144   WriteRegStr HKCR "VLC$R0\shell\Play\command" "" '"$INSTDIR\vlc.exe" "%1"'\r
145   WriteRegStr HKCR "VLC$R0\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'\r
146 FunctionEnd\r
147 \r
148 Function un.RegisterExtension\r
149   ;start of restore script\r
150   ReadRegStr $1 HKCR "$R0" ""\r
151   StrCmp $1 "VLC$R0" 0 NoOwn ; only do this if we own it\r
152     ReadRegStr $1 HKCR "$R0" "VLC.backup"\r
153     StrCmp $1 "" 0 Restore ; if backup="" then delete the whole key\r
154       DeleteRegKey HKCR "$R0"\r
155     Goto NoOwn\r
156 Restore:\r
157       WriteRegStr HKCR "$R0" "" $1\r
158       DeleteRegValue HKCR "$R0" "VLC.backup"\r
159 NoOwn:\r
160     DeleteRegKey HKCR "VLC$R0" ;Delete key with association settings\r
161 FunctionEnd\r
162 \r
163 !macro RegisterExtensionSection EXT\r
164   Section /o ${EXT}\r
165     Push $R0\r
166     StrCpy $R0 ${EXT}\r
167     Call RegisterExtension\r
168     Pop $R0\r
169   SectionEnd\r
170 !macroend\r
171 \r
172 !macro UnRegisterExtensionSection EXT\r
173   Push $R0\r
174   StrCpy $R0 ${EXT}\r
175   Call un.RegisterExtension\r
176   Pop $R0\r
177 !macroend\r
178 \r
179 !macro WriteRegStrSupportedTypes EXT\r
180   WriteRegStr HKCR Applications\vlc.exe\SupportedTypes ${EXT} ""\r
181 !macroend\r
182 \r
183 ;;;;;;;;;;;;;;;;;;;;;;;;\r
184 ; Context menu entries ;\r
185 ;;;;;;;;;;;;;;;;;;;;;;;;\r
186 \r
187 !macro AddContextMenu EXT\r
188   WriteRegStr HKCR ${EXT}\shell\PlayWithVLC "" "Play with VLC media player"\r
189   WriteRegStr HKCR ${EXT}\shell\PlayWithVLC\command "" '$INSTDIR\vlc.exe --no-playlist-enqueue "%1"'\r
190 \r
191   WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC "" "Add to VLC media player's Playlist"\r
192   WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC\command "" '$INSTDIR\vlc.exe --one-instance --playlist-enqueue "%1"'\r
193 !macroend\r
194 \r
195 !macro DeleteContextMenu EXT\r
196   DeleteRegKey HKCR ${EXT}\shell\PlayWithVLC\r
197   DeleteRegKey HKCR ${EXT}\shell\AddToPlaylistVLC\r
198 !macroend\r
199 \r
200 ;;;;;;;;;;;;;;;;;;;;;;\r
201 ; Installer sections ;\r
202 ;;;;;;;;;;;;;;;;;;;;;;\r
203 \r
204 Section "Media player (required)" SEC01\r
205   SectionIn 1 2 3 RO\r
206   SetShellVarContext all\r
207   SetOutPath "$INSTDIR"\r
208 \r
209   File  vlc.exe\r
210   File  vlc.exe.manifest\r
211   File  *.txt\r
212 \r
213   File  /r plugins\r
214   File  /r locale\r
215   File  /r skins\r
216   File  /r http\r
217 \r
218   ; Add VLC to "recomended programs" for the following extensions\r
219   WriteRegStr HKCR Applications\vlc.exe "" ""\r
220   WriteRegStr HKCR Applications\vlc.exe "FriendlyAppName" "VLC media player"\r
221   WriteRegStr HKCR Applications\vlc.exe\shell\Play "" "Play with VLC"\r
222   WriteRegStr HKCR Applications\vlc.exe\shell\Play\command "" \\r
223     '$INSTDIR\vlc.exe "%1"'\r
224   !insertmacro MacroAllExtensions WriteRegStrSupportedTypes\r
225 \r
226   WriteRegStr HKCR "AudioCD\shell\PlayWithVLC" "" "Play with VLC media player"\r
227   WriteRegStr HKCR "AudioCD\shell\PlayWithVLC\command" "" \\r
228     "$INSTDIR\vlc.exe cdda:%1"\r
229   WriteRegStr HKCR "DVD\shell\PlayWithVLC" "" "Play with VLC media player"\r
230   WriteRegStr HKCR "DVD\shell\PlayWithVLC\command" "" \\r
231     "$INSTDIR\vlc.exe dvd:%1"\r
232 \r
233   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival" ""\r
234   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Action" "Play DVD movie"\r
235   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'\r
236   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeProgID" "VLC.DVDMovie"\r
237   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeVerb" "play"\r
238   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Provider" "VideoLAN VLC media player"\r
239 \r
240   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival" ""\r
241   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Action" "Play CD audio"\r
242   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'\r
243   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeProgID" "VLC.CDAudio"\r
244   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeVerb" "play"\r
245   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Provider" "VideoLAN VLC media player"\r
246   WriteRegStr HKCR "VLC.DVDMovie" "" "VLC DVD Movie"\r
247   WriteRegStr HKCR "VLC.DVDMovie\shell" "" "Play"\r
248   WriteRegStr HKCR "VLC.DVDMovie\shell\Play\command" "" \\r
249     '$INSTDIR\vlc.exe dvd:%1@1:0'\r
250   WriteRegStr HKCR "VLC.DVDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'\r
251   WriteRegStr HKCR "VLC.CDAudio" "" "VLC CD Audio"\r
252   WriteRegStr HKCR "VLC.CDAudio\shell" "" "Play"\r
253   WriteRegStr HKCR "VLC.CDAudio\shell\Play\command" "" \\r
254     '$INSTDIR\vlc.exe cdda:%1'\r
255   WriteRegStr HKCR "VLC.CDAudio\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'\r
256 \r
257 SectionEnd\r
258 \r
259 Section "Start Menu + Desktop Shortcut" SEC02\r
260   SectionIn 1 2 3\r
261   CreateDirectory "$SMPROGRAMS\VideoLAN"\r
262   CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player.lnk" \\r
263     "$INSTDIR\vlc.exe" "--intf wxwin --wxwin-embed"\r
264   CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player (alt).lnk" \\r
265     "$INSTDIR\vlc.exe" "--intf wxwin --no-wxwin-embed"\r
266   CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player (skins).lnk" \\r
267     "$INSTDIR\vlc.exe" "--intf skins"\r
268   CreateShortCut "$SMPROGRAMS\VideoLAN\Reset VLC defaults and quit.lnk" \\r
269     "$INSTDIR\vlc.exe" "--reset-config --reset-plugins-cache --save-config vlc:quit "\r
270   CreateShortCut "$DESKTOP\VLC media player.lnk" \\r
271     "$INSTDIR\vlc.exe" "--intf wxwin"\r
272   WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" \\r
273     "${PRODUCT_WEB_SITE}"\r
274   CreateShortCut "$SMPROGRAMS\VideoLAN\${PRODUCT_NAME} Website.lnk" \\r
275     "$INSTDIR\${PRODUCT_NAME}.url"\r
276   WriteIniStr "$INSTDIR\Documentation.url" "InternetShortcut" "URL" \\r
277     "${PRODUCT_WEB_SITE}/doc/"\r
278   CreateShortCut "$SMPROGRAMS\VideoLAN\Documentation.lnk" \\r
279     "$INSTDIR\Documentation.url"\r
280 SectionEnd\r
281 \r
282 Section /o "Mozilla plugin" SEC03\r
283   SectionIn 2 3\r
284   File /r mozilla\r
285 \r
286   ; doesn't work. bug in mozilla/mozilla firefox or moz documentation (xpt file isn't loaded)\r
287   ; see mozilla bugs 184506 and 159445\r
288   ;!define Moz "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}"\r
289   ;WriteRegStr HKLM ${Moz} "Description" "VideoLAN VLC plugin for Mozilla"\r
290   ;WriteRegStr HKLM ${Moz} "Path" "$INSTDIR\mozilla\npvlc.dll"\r
291   ;WriteRegStr HKLM ${Moz} "Product" "VLC media player"\r
292   ;WriteRegStr HKLM ${Moz} "Vendor" "VideoLAN"\r
293   ;WriteRegStr HKLM ${Moz} "Version" "${VERSION}"\r
294   ;WriteRegStr HKLM ${Moz} "XPTPath" "$INSTDIR\mozilla\vlcintf.xpt"\r
295 \r
296   Push $R0\r
297   Push $R1\r
298   Push $R2\r
299 \r
300   !define Index 'Line${__LINE__}'\r
301   StrCpy $R1 "0"\r
302 \r
303   "${Index}-Loop:"\r
304 \r
305     ; Check for Key\r
306     EnumRegKey $R0 HKLM "SOFTWARE\Mozilla" "$R1"\r
307     StrCmp $R0 "" "${Index}-End"\r
308     IntOp $R1 $R1 + 1\r
309     ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins"\r
310     StrCmp $R2 "" "${Index}-Loop" ""\r
311 \r
312     CopyFiles "$INSTDIR\mozilla\*" "$R2"\r
313     Goto "${Index}-Loop"\r
314 \r
315   "${Index}-End:"\r
316   !undef Index\r
317 \r
318 SectionEnd\r
319 \r
320 Section /o "ActiveX plugin" SEC04\r
321   SectionIn 2 3\r
322   SetOutPath "$INSTDIR"\r
323   File activex\axvlc.dll\r
324   RegDLL "$INSTDIR\axvlc.dll"\r
325 SectionEnd\r
326 \r
327 Section "Context Menus" SEC05\r
328   SectionIn 1 2 3\r
329   !insertmacro MacroAllExtensions AddContextMenu\r
330 SectionEnd\r
331 \r
332 SectionGroup "File type associations" SEC06\r
333   SectionGroup "Audio Files"\r
334     !insertmacro MacroAudioExtensions RegisterExtensionSection\r
335   SectionGroupEnd\r
336   SectionGroup "Video Files"\r
337     !insertmacro MacroVideoExtensions RegisterExtensionSection\r
338   SectionGroupEnd\r
339   SectionGroup "Other"\r
340     !insertmacro MacroOtherExtensions RegisterExtensionSection\r
341   SectionGroupEnd\r
342 SectionGroupEnd\r
343 \r
344 Section -Post\r
345   WriteUninstaller "$INSTDIR\uninstall.exe"\r
346   WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "InstallDir" $INSTDIR\r
347   WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "Version" "${VERSION}"\r
348   WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\vlc.exe"\r
349 \r
350   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \\r
351     "DisplayName" "$(^Name)"\r
352   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \\r
353     "UninstallString" "$INSTDIR\uninstall.exe"\r
354   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \\r
355     "DisplayIcon" "$INSTDIR\vlc.exe"\r
356   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \\r
357     "DisplayVersion" "${PRODUCT_VERSION}"\r
358   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \\r
359     "URLInfoAbout" "${PRODUCT_WEB_SITE}"\r
360   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \\r
361     "Publisher" "${PRODUCT_PUBLISHER}"\r
362 SectionEnd\r
363 \r
364 ; Section descriptions\r
365 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN\r
366   !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} \\r
367     "The media player itself"\r
368   !insertmacro MUI_DESCRIPTION_TEXT ${SEC02} \\r
369     "Adds icons to your start menu and your desktop for easy access"\r
370   !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} \\r
371     "The VLC Mozilla and Mozilla Firefox plugin"\r
372   !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} \\r
373     "The VLC ActiveX plugin"\r
374   !insertmacro MUI_DESCRIPTION_TEXT ${SEC05} \\r
375     "Add context menu items (Play With VLC and Add To VLC's Playlist)"\r
376   !insertmacro MUI_DESCRIPTION_TEXT ${SEC06} \\r
377     "Sets VLC media player as the default application for the specified file type"\r
378 !insertmacro MUI_FUNCTION_DESCRIPTION_END\r
379 \r
380 \r
381 Function un.onUninstSuccess\r
382   HideWindow\r
383   MessageBox MB_ICONINFORMATION|MB_OK \\r
384     "$(^Name) was successfully removed from your computer."\r
385 FunctionEnd\r
386 \r
387 Function un.onInit\r
388   MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 \\r
389     "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2\r
390   Abort\r
391 FunctionEnd\r
392 \r
393 Section Uninstall\r
394   SetShellVarContext all\r
395 \r
396   !insertmacro MacroAllExtensions DeleteContextMenu\r
397   !insertmacro MacroAllExtensions UnRegisterExtensionSection\r
398 \r
399   UnRegDLL "$INSTDIR\axvlc.dll"\r
400   Delete /REBOOTOK "$INSTDIR\axvlc.dll"\r
401 \r
402   ;remove mozilla plugin\r
403   Push $R0\r
404   Push $R1\r
405   Push $R2\r
406 \r
407   !define Index 'Line${__LINE__}'\r
408   StrCpy $R1 "0"\r
409 \r
410   "${Index}-Loop:"\r
411 \r
412     ; Check for Key\r
413     EnumRegKey $R0 HKLM "SOFTWARE\Mozilla" "$R1"\r
414     StrCmp $R0 "" "${Index}-End"\r
415     IntOp $R1 $R1 + 1\r
416     ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins"\r
417     StrCmp $R2 "" "${Index}-Loop" ""\r
418 \r
419     Delete "$R2\vlcintf.xpt"\r
420     Delete "$R2\npvlc.dll"\r
421     Goto "${Index}-Loop"\r
422 \r
423   "${Index}-End:"\r
424   !undef Index\r
425 \r
426   RMDir "$SMPROGRAMS\VideoLAN"\r
427   RMDir /r $SMPROGRAMS\VideoLAN\r
428   RMDir /r $INSTDIR\r
429   DeleteRegKey HKLM Software\VideoLAN\r
430 \r
431   DeleteRegKey HKCR Applications\vlc.exe\r
432   DeleteRegKey HKCR AudioCD\shell\PlayWithVLC\r
433   DeleteRegKey HKCR DVD\shell\PlayWithVLC\r
434   DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival"\r
435   DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival\r
436   DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival"\r
437   DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival\r
438   DeleteRegKey HKCR "VLC.MediaFile"\r
439 \r
440   DeleteRegKey HKLM \\r
441     SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}\r
442 \r
443   DeleteRegKey HKLM \\r
444     Software\Microsoft\Windows\CurrentVersion\Uninstall\VideoLAN\r
445 \r
446   Delete "$DESKTOP\VLC media player.lnk"\r
447 \r
448   DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"\r
449   DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"\r
450   SetAutoClose true\r
451 SectionEnd\r