From 37f0092397d96dac55c5f8a497fc3f74053b6d70 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kempf Date: Wed, 23 Jan 2008 06:44:16 +0000 Subject: [PATCH] Vista registeration inside the installer... Has to be tested. --- vlc.win32.nsi.in | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/vlc.win32.nsi.in b/vlc.win32.nsi.in index 15e9bf26e7..8a4a5dc84c 100644 --- a/vlc.win32.nsi.in +++ b/vlc.win32.nsi.in @@ -186,6 +186,15 @@ NoBackup: WriteRegStr HKCR "VLC$R0\shell" "" "Play" WriteRegStr HKCR "VLC$R0\shell\Play\command" "" '"$INSTDIR\vlc.exe" --started-from-file "%1"' WriteRegStr HKCR "VLC$R0\DefaultIcon" "" '"$INSTDIR\vlc.exe",0' + + ; Vista detection + ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion + StrCpy $R2 $R1 3 + StrCmp $R2 '6.0' ForVista ToEnd +ForVista: + WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities\FileAssociations" "$R0" "VLC$R0" +ToEnd: + FunctionEnd Function un.RegisterExtension @@ -413,6 +422,18 @@ Section "Media player (required)" SEC01 '$INSTDIR\vlc.exe --started-from-file cdda:%1' WriteRegStr HKCR "VLC.CDAudio\DefaultIcon" "" '"$INSTDIR\vlc.exe",0' + ; Vista detection + ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion + StrCpy $R1 $R0 3 + StrCmp $R1 '6.0' lbl_vista lbl_done + + lbl_vista: + WriteRegStr HKLM "Software\RegisteredApplications" "VLC" "Software\Clients\Media\VLC\Capabilities" + WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationName" "VLC media player" + WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationDescription" "VLC - The video swiss knife" + + lbl_done: + SectionEnd Section "Start Menu Shortcut" SEC02a @@ -722,6 +743,7 @@ Section "Uninstall" SEC91 DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival" DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival + DeleteRegKey HKLM Software\Clients\Media\VLC DeleteRegKey HKCR "VLC.MediaFile" DeleteRegKey HKLM \ -- 2.20.1