]> git.sesse.net Git - vlc/commitdiff
Win32: fix version check at install time
authorGeoffroy Couprie <geal@videolan.org>
Tue, 8 Sep 2009 17:53:49 +0000 (19:53 +0200)
committerGeoffroy Couprie <geal@videolan.org>
Tue, 8 Sep 2009 19:33:07 +0000 (21:33 +0200)
extras/package/win32/vlc.win32.nsi.in

index 6afecd4b676894d019f340654655978e83a41b78..b9748712faa9e324f2009c184c09ba320b8c2324 100644 (file)
@@ -147,10 +147,10 @@ NoBackup:
   WriteRegStr HKCR "VLC$R0\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
 
 ;;; Vista Only part
-  ; Vista detection
+  ; Vista and above detection
   ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
-  StrCpy $R2 $R1 3
-  StrCmp $R2 '6.0' ForVista ToEnd
+  StrCpy $R2 $R1 1
+  StrCmp $R2 '6' ForVista ToEnd
 ForVista:
   WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities\FileAssociations" "$R0" "VLC$R0"
 
@@ -446,11 +446,11 @@ Section $Name_Section01 SEC01
     '"$INSTDIR\vlc.exe" --started-from-file "%1"'
   !insertmacro MacroAllExtensions WriteRegStrSupportedTypes
 
-; Vista Registration
-  ; Vista detection
+; Windows default programs Registration
+  ; Vista and above detection
   ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
-  StrCpy $R1 $R0 3
-  StrCmp $R1 '6.0' lbl_vista lbl_done
+  StrCpy $R1 $R0 1
+  StrCmp $R1 '6' lbl_vista lbl_done
 
   lbl_vista:
   WriteRegStr HKLM "Software\RegisteredApplications" "VLC" "Software\Clients\Media\VLC\Capabilities"