Joel
15th March 2003 16:11 UTC
ok, one question about the registry:
I wanna read this string from Nsis:
ReadRegStr $R6 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion" "ProductName" 
      
      It suppose to read the name of the Windows installed... It works in
      my machine Windows ME, because display in the output:
      "Microsoft Windows ME".
      
      My question is: does Win95/98 has the same reg path? and What about
      NT/2000/XP?
      
      Thanks :p
    
      kichik
      15th March 2003 16:15 UTC
      Use GetWindowsVersion to get the name of the OS:
      http://nsis.sourceforge.net/Docs/AppendixB.html#B.5
     
    
      Joel
      15th March 2003 16:28 UTC
      already try that ;)
      but with this you can simplifly the function with 2 or 3 line code.
      what you think?
     
    
      kichik
      15th March 2003 16:36 UTC
      On NT you'll have to use:
      
      
ReadRegStr $R6 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" "ProductName"
      
      GetWindowsVersion already does that for you, and it was tested on those versions of Windows. You'll have to make sure ProductName is on every Windows version.
    
 
    
      Joel
      15th March 2003 16:41 UTC
      Well... it's suppose, isn't?
      or less the user tweak the registry ;)
      thanks... :up: :p
     
    
      Afrow UK
      15th March 2003 18:38 UTC
      ReadRegStr $R6 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion" "ProductName"
      
      Doesn't work on WinXP
      
      -Stuart
     
    
      Joel
      15th March 2003 18:41 UTC
      
      
        Originally posted by Afrow UK
        ReadRegStr $R6 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion" "ProductName"
        
        Doesn't work on WinXP
        
        -Stuart
      
That's way:
      
      
ReadRegStr $R6 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" "ProductName"
ReadRegStr $R6 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion" "ProductName"
;Only one it's going to have the name of Windows in $R6
     
    
      kichik
      15th March 2003 19:12 UTC
      Afrow, NT usually means NT, 2000 and XP, that's why my post applies to XP too.