Vista Gold-RTM - confirm functions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Eagle
    Indigo Rose Customer
    • Mar 2005
    • 944

    Vista Gold-RTM - confirm functions

    here's a couple of functions and call examples to test for Vista RTM
    (if is beta or rc release then - application exit)

    tweak to suit - test code examples only.

    Code:
    function IsVista_Legit()
    local tOsVer = System.GetOSVersionInfo();
    if tOsVer then
    Dialog.Message("function - internal debug info", tOsVer.BuildNumber); --delete
    	if ((tOsVer.MajorVersion == "6") and (tOsVer.BuildNumber >= "6000")) then
    		return true; --confirmed Vista RTM or later
    	end
    end
    return false; --wrong version(or could not get OSVersionInfo)
    end
    
    --an OsVersionInfo method - test call for Vista RTM only
    if (not IsVista_Legit()) then
    Dialog.Message("Notice", "Wrong version or no OSVersionInfo");
    Application.Exit();
    else
    Dialog.Message("Notice", "Confirmed Vista (RTM) or Later");
    end
    
    function GetKernalInfo(sVer)
    local tOsKernal = File.GetVersionInfo(_SystemFolder.."\\ntdll.dll");
    if tOsKernal and sVer then
    Dialog.Message("function - internal debug info", tOsKernal.FileVersion); --delete
    	if (tOsKernal.FileVersion >= sVer) then
    		return true;--confirmed Vista RTM or later	
    	end	 
    end
    return false; --wrong version(or could not GetVersionInfo)
    end
    
    --an Os Kernal Version method - test call for Vista RTM only !
    if (not GetKernalInfo("6.0.6000.16386")) then
    Dialog.Message("Notice", "Wrong version or no VersionInfo");
    Application.Exit();
    else
    Dialog.Message("Notice", "Confirmed Minimum Version or Later");
    end
    note: the System.GetOSVersionInfo(); method should be sufficient
    however to really nail it the File.GetVersionInfo(_SystemFolder.."\\ntdll.dll");
    method is recommened.

    hth a little
  • Steve_K
    Indigo Rose Customer
    • Aug 2004
    • 109

    #2
    Just FYI:

    I have a few customers who reported that

    Code:
    (tOsVer.MajorVersion == "6")
    does not work properly on Vista RTM. It's very rare that it does not work, and I was never able to reproduce it ... Maybe something interferes with SF7 when running on Vista and when it tries to get the OS Major Version number ...



    Steve

    Comment

    • Eagle
      Indigo Rose Customer
      • Mar 2005
      • 944

      #3
      Kernal (compare method):

      Code:
      function GetKernalInfo(sVer)
      local tOsKernal = File.GetVersionInfo(_SystemFolder.."\\ntdll.dll");
      if (tOsKernal and sVer) then
      Dialog.Message("function - internal debug info", "System: "..tOsKernal.FileVersion.."\r\nTarget: "..sVer); --delete
      	if (String.CompareFileVersions(tOsKernal.FileVersion, sVer) >= 0) then
      		return true;--confirmed Vista RTM or later	
      	end	
      end
      return false;
      end
      
      --an Os Kernal Version method - test call for Vista RTM only !
      if (not GetKernalInfo("6.0.6000.16386")) then
      Dialog.Message("Notice", "Wrong version or no VersionInfo");
      Application.Exit();
      else
      Dialog.Message("Notice", "Confirmed Minimum Version or Later");
      end
      Steven could you please assist by confirming the ntdll.dll version
      for your RTM please ?

      tks

      Comment

      • Steve_K
        Indigo Rose Customer
        • Aug 2004
        • 109

        #4
        I can confirm that the above works fine on my RTMs installed (English and German).

        Code:
        (tOsVer.MajorVersion == "6")
        also worked for me, but not always, for some reason. I was unable to reproduce that properly - I could not find any reason for it not to work certain times ...



        Steve

        Comment

        • Eagle
          Indigo Rose Customer
          • Mar 2005
          • 944

          #5
          tks Steve, would you be so kind as to verify the actual ntdll.dll
          file version for RTM is 6.0.6000.16386 and if not post it here ?

          as for:

          (tOsVer.MajorVersion == "6) not being 100% reliable:

          for the uniniciated, don't forget at this point in time, SUF70 on Vista is not 'offically supported' by IR.

          as for any current version SUF70 runtime crashes or 'errors' when testing on Vista RTM,
          try running the suspect 'mysetup.exe" in 'windows xp sp2' compatibility mode for now.
          Last edited by Eagle; 11-24-2006, 07:22 AM.

          Comment

          • Steve_K
            Indigo Rose Customer
            • Aug 2004
            • 109

            #6
            File version of ntdll.dll on my Vista RTM English and Vista RTM German is

            6.0.6000.16386



            Steve

            Comment

            • Eagle
              Indigo Rose Customer
              • Mar 2005
              • 944

              #7
              kool, tks Steve

              Comment

              • Steve_K
                Indigo Rose Customer
                • Aug 2004
                • 109

                #8
                Just an update after some reports that

                Code:
                (tOsVer.MajorVersion == "6")
                doesn't seem to work under any circumstance ...

                I have a few customers who are complaining that my setup doesn't detect Vista properly. I am using the above method to check for Vista.

                I cannot tell for sure what makes this method not to work on some machines - am still in contact with those people who reported that it fails to detect Vista. Anyway - it could be that it fails on those machines that were upgraded from XP to Vista. On 'clean Vista machines', where Vista was not upgraded from any other pre-Vista Windows, the method to detect Vista seems to work at any time. I cannot tell for sure whether an upgrade from a pre-Vista system is the only cause for the problem.

                Just thought I should let you know ... will keep you up-to-date with what I find out.

                I am currently thinking about checking the registry for the OS version number as an additional check.

                HKLM\Software\Microsoft\Windows NT\Current Version\

                stores some information on the OS. The value 'CurrentVersion' for example reads '6.0' on Vista RTM. We could use that information for an alternative routine to check for Vista. One one of the other values at that location of the registry.

                Steve

                Comment

                • Steve_K
                  Indigo Rose Customer
                  • Aug 2004
                  • 109

                  #9
                  Another update on the update above ...

                  I can now confirm that upgraded versions of Vista (upgraded from XP) do sometimes cause the above function not to work properly. Whether this is the case with any upgrade, I cannot tell for sure, but I think so.

                  It would be interesting to know where the 'tOsVer' function gets the OS version information from. From the registry, or from where else? IR could shed some light on this, please.

                  Thanks!

                  Comment

                  • Eagle
                    Indigo Rose Customer
                    • Mar 2005
                    • 944

                    #10
                    if look'n in the registry I would also suggest returning the value for:

                    ProductName

                    this will also give you the 'Edition' of Vista that has been 'activated' installed
                    (could do a String.Find(returned value string, "Vista", false)
                    in that returned string for "Vista" which would confirm is Vista)

                    having said that, the below is proving to be reliable for Vista RTM:
                    when running setups compiled with SUF70 sr 7.0.5.1

                    I am currently confirming the Os platform type(is client) and the ntdll.dll version number
                    to ensure is Vista(RTM and not pre-vista RTM).
                    (if is server platform and the first digit in ntdll.dll is 6, then that
                    reveals is a 'Longhorn Server' Os - still very beta and should not be supported)

                    I also have been returning the registry value: ProductName
                    for display purposes successfully on Vista

                    hth for now
                    Last edited by Eagle; 12-21-2006, 07:32 AM.

                    Comment

                    • Steve_K
                      Indigo Rose Customer
                      • Aug 2004
                      • 109

                      #11
                      Yeah, I am now using a mixture of all the above to make sure that it detects Vista through at least one of the options.

                      First it checks through tOsVer.MajorVersion, then it checks for the 'CurrentVersion' entry in the registry, and then it checks for the 'ProductName' value. If at least one of those matches Vista, then it should be Vista ...

                      Steve

                      Comment

                      Working...
                      X