]> git.sesse.net Git - vlc/commitdiff
Vista registeration inside the installer... Has to be tested.
authorJean-Baptiste Kempf <jb@videolan.org>
Wed, 23 Jan 2008 06:44:16 +0000 (06:44 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 23 Jan 2008 06:44:16 +0000 (06:44 +0000)
vlc.win32.nsi.in

index 15e9bf26e7d84fa920cdaac62bc089075c9eb6f4..8a4a5dc84c9566ed47afe44b1d0430690062aa24 100644 (file)
@@ -186,6 +186,15 @@ NoBackup:
   WriteRegStr HKCR "VLC$R0\shell" "" "Play"\r
   WriteRegStr HKCR "VLC$R0\shell\Play\command" "" '"$INSTDIR\vlc.exe" --started-from-file "%1"'\r
   WriteRegStr HKCR "VLC$R0\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'\r
+\r
+  ; Vista detection\r
+  ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion\r
+  StrCpy $R2 $R1 3\r
+  StrCmp $R2 '6.0' ForVista ToEnd\r
+ForVista:\r
+  WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities\FileAssociations" "$R0" "VLC$R0"\r
+ToEnd:\r
+\r
 FunctionEnd\r
 \r
 Function un.RegisterExtension\r
@@ -413,6 +422,18 @@ Section "Media player (required)" SEC01
     '$INSTDIR\vlc.exe --started-from-file cdda:%1'\r
   WriteRegStr HKCR "VLC.CDAudio\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'\r
 \r
+  ; Vista detection\r
+  ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion\r
+  StrCpy $R1 $R0 3\r
+  StrCmp $R1 '6.0' lbl_vista lbl_done\r
+\r
+  lbl_vista:\r
+  WriteRegStr HKLM "Software\RegisteredApplications" "VLC" "Software\Clients\Media\VLC\Capabilities"\r
+  WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationName" "VLC media player"\r
+  WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationDescription" "VLC - The video swiss knife"\r
+\r
+  lbl_done:\r
+\r
 SectionEnd\r
 \r
 Section "Start Menu Shortcut" SEC02a\r
@@ -722,6 +743,7 @@ Section "Uninstall" SEC91
   DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival\r
   DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival"\r
   DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival\r
+  DeleteRegKey HKLM Software\Clients\Media\VLC\r
   DeleteRegKey HKCR "VLC.MediaFile"\r
 \r
   DeleteRegKey HKLM \\r