none
How to detect windows 2008 foundation ? RRS feed

  • Question

  • how to detect windows 2008 foundation?
    can i use GetVersionEx and GetProductInfo API?

    what's the right return value from GetProductInfo of Windows 2008 foundation.
    Thursday, April 16, 2009 7:57 AM

All replies

  • Hi Tommy_cug,

    Yes you can use the GetVersionEx and GetProductInfo API

     The GetProductInfo API returns the following information

    1.       Major version number

    2.       Minor version number

    3.       Service pack major version number

    4.       Service pack minor version number

    5.       Product type. - E.g. Enterprise, Home etc

    You can go through the following links for more information:

    http://msdn.microsoft.com/en-us/library/ms724833(VS.85).aspx

    http://msdn.microsoft.com/en-us/library/ms724451(VS.85).aspx

    http://msdn.microsoft.com/en-us/library/ms724358(VS.85).aspx

    http://www.microsoft.com/windowsserver2008/en/us/foundation.aspx

    Here is a code snippet which shows how you can use them.

    internal static extern bool GetProductInfo(

                      int osMajorVersion,

                      int osMinorVersion,

                      int spMajorVersion,

                      int spMinorVersion,

                      out int edition );

    GetProductInfo( majorVersion, minorVersion,osVersionInfo.wServicePackMajor, osVersionInfo.wServicePackMinor,out ed )

     

    Hope this helps

    Regards

    Gayathri

    Thursday, April 16, 2009 8:14 PM
  • thanks

     i know how to use GetProductInfo and GetVersionInfoEx,

    internal static extern bool GetProductInfo(

                      int osMajorVersion,

                      int osMinorVersion,

                      int spMajorVersion,

                      int spMinorVersion,

                      out int edition );

     IN "out int edition " pdwReturnedProductType ,
    i just can see server 2008 Datacenter ,Enterprise ,Standard ......
    but there is no foundation

    i know server 2008 foundation was a small business application.

    PRODUCT_SMALLBUSINESS_SERVER
          0x00000009

          Windows Small Business Server

    does this value indicate server 2008 foundation ?









    Friday, April 17, 2009 1:09 AM