# class Chef::ReservedNames::Win32::Version

### Constants

WIN_VERSIONS

### Public Class Methods

new() click to toggle source

    # File lib/chef/win32/version.rb, line 61
    def initialize
      @major_version, @minor_version, @build_number = get_version
      ver_info = get_version_ex
      @product_type = ver_info[:w_product_type]
      @suite_mask = ver_info[:w_suite_mask]
      @sp_major_version = ver_info[:w_service_pack_major]
      @sp_minor_version = ver_info[:w_service_pack_minor]

      # Obtain sku information for the purpose of identifying
      # datacenter, cluster, and core skus, the latter 2 only
      # exist in releases after Windows Server 2003
      if ! Chef::Platform::windows_server_2003?
        @sku = get_product_info(@major_version, @minor_version, @sp_major_version, @sp_minor_version)
      else
        # The get_product_info API is not supported on Win2k3,
        # use an alternative to identify datacenter skus
        @sku = get_datacenter_product_info_windows_server_2003(ver_info)
      end
    end