Microsoft KB Archive/936607

= How to programmatically obtain the channel code values for System Management Server Service Pack 3 =

Article ID: 936607

Article Last Modified on 10/31/2007

-

APPLIES TO

 Microsoft Systems Management Server 2003 Service Pack 3, when used with:  Windows Vista Home Basic

 Windows Vista Home Premium

 Windows Vista Ultimate

 Windows Vista Business</li></ul>

 Windows Vista Enterprise</li></ul>

 Windows Vista Starter</li></ul>

 Microsoft Windows Server 2003, Standard Edition (32-bit x86)</li></ul>

 Microsoft Windows Server 2003, Enterprise Edition</li></ul>

 Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)</li></ul>

 Microsoft Windows Server 2003, Web Edition</li></ul>

 Microsoft Windows XP Home Edition</li></ul>

 Microsoft Windows XP Professional</li></ul>

<ul> <li>Microsoft Windows XP Starter Edition</li></ul>

<ul> <li>Microsoft Windows XP Media Center Edition 2002</li></ul>

<ul> <li>Microsoft Windows 2000 Professional Edition</li></ul>

<ul> <li>Microsoft Windows 2000 Server</li></ul>

<ul> <li>Microsoft Windows 2000 Advanced Server</li></ul>

<ul> <li>Microsoft Windows 2000 Datacenter Server</li></ul> </li></ul>

-

<div class="notice_section">

Important This article contains information about how to modify the registry. Make sure that you back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry

<div class="summary_section">

INTRODUCTION
This article contains information to help developers determine the sales origin of an installed software product. This article describes how to parse the DigitalProductId binary entry in the Windows registry to extract the sales channel information by using a predefined offset. For example, the sales channel information may indicate that the product was sold through the retail channel or through an OEM channel. This article applies to version 3 and version 4 of the DigitalProductId registry entry that is used in the Windows products that are listed in the &quot;Applies to&quot; section.

Note This information is provided only for license channel identification and for reporting. This article describes a method of extracting this information. However, this article does not contain steps or sample code.

<div class="moreinformation_section">

MORE INFORMATION
Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

The DigitalProductId registry entry for a software product is located in the system registry hive under the  subkey for the product. The DigitalProductId registry entry for an operating system is located in the following registry subkey:

The DigitalProductId registry entry contains the encoded REG_BINARY value of the product key that was used to enable the software product. The entry contains the following information:

Name: DigitalProductId

Type: REG_BINARY

Data: ...

To determine the channel information, calculate the following offsets.

Note Each byte represents two characters of the binary value.
 * Bytes 0 through 3 represent the total size of the data when cast to DWORD.
 * Bytes 4 and 5 represent the major version number of the Windows product when cast to WORD.
 * Bytes 6 and 7 represent the minor version number of the Windows product when cast to WORD.

If the major version number is 3, bytes 80, 81, 82, and 83 (cast to DWORD) contain the numeric value for channel. The following table lists the possible DWORD values.

If the major version number is 4, the 128 bytes that start at byte offset 1016 contain the Unicode string that corresponds to the channel. The following string values are possible:
 * Retail
 * OEM:SLP
 * OEM:COA
 * OEM:NONSLP
 * Volume:CSVLK
 * Volume:GVLK
 * Volume:MAK

Keywords: kbhowto kbinfo kbexpertiseinter KB936607

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.