Computer ID Number [Legacy]


The Computer ID Number methodology described here has been deprecated but is still available for backwards compatibility. It is recommended to use the Enhanced Computer ID Algorithms if possible. The legacy BIOS algorithm is no longer supported and will generally not execute on Windows Vista or most 64-bit versions of Windows.

The primary purpose of the Computer ID Number is to identify a specific computer's hardware and/or software configuration. In many cases, this number is unique. There are several algorithms available to generate this number. During development and even at runtime, the developer can decide which algorithm(s) to use. Computer ID Numbers are used to enforce license compliance (also known as hardware-binding or copy-protection).  They are used in conjunction with Trigger Codes to help assure that the activation code given to a customer will only work on the desired computer. The available algorithms involve several types of identification methods:







No longer supported.



Identifies the drive volume serial number of the specified drive. A drive letter must be specified, or a value of "0" may be specified to use the drive upon which Windows is installed.



No longer supported.



No longer supported.



Calculates number based upon network server profile by determining the network server name and volume for a given drive letter or UNC path.









Uses Windows ProductID and ProductKey created when Windows is installed.



Calculates a number based upon the TCP/IP address of a given server name, drive letter connected to a network server, or UNC path to a server.



Uses the Enhanced Computer ID Algorithms



Provide a server's UNC path, host name, or IP address through either the filename or the hard drive parameter (you may leave one as an empty string) and this will compute a number based on that server's MAC address. Please be considerate of the possibility of redundant Network Interface Cards (NIC) when using this algorithm (you may need to authorize the server once for each NIC).

Computer ID Number Compatibility

The following table documents the Computer ID generation limitations in the libraries. Each row represents an algorithm, while each column represents a version of the Microsoft Windows operating system. A check mark means the algorithm is supported under the corresponding operating system. The absence of a check mark indicates that  the algorithm has been deprecated in favor of the Enhanced Computer ID Algorithms.


An 'X' means the algorithm is not supported and is known to fail in the corresponding operating system. Additionally, any 16-bit programs, the FAT16 file system format, or any version of DOS or Windows prior to Windows 2000 is unsupported.



Windows 2000


Server 2003

server 2008


Windows 7























Choosing Algorithms to Use

Because many developers have different reasons to use Computer ID Numbers, determining the proper algorithm(s) to use is an art, rather than a science.  The more algorithms you choose, the more restrictive the security tests and the more susceptible your application will become to the need to be re-unlocked when (not if) the customer changes hardware or software settings.  Depending upon exactly how restrictive you want to be will ultimately decide which algorithms you should choose.  Generally, we recommend you use the Enhanced Computer ID Algorithms rather than the other Legacy Computer ID Algorithms listed here.

Peer-to-Peer Networks

Keep in mind that when you must support peer-to-peer networks, you may need to recognize at runtime whether your application is being executed on the server or on the client. The DLL/LIB interface function pp_redir() will indicate if the drive is local or remote.  The ActiveX interface method Redir will indicate if the drive is local or remote. When the application is running on a single computer or the network server, any of the algorithms except COMPNO_NETNAME may be used. When the application is running off a network server, the COMPNO_NETNAME algorithm must be used because this is the only algorithm that will return the same value for all of the client stations.

It is now recommended to run the application installed on a peer server using the UNC path or mapped drive letter, just as a workstation would, so only the COMPNO_NETNAME algorithm is used and only a single activation is required to enable the entire network.

Generating Computer ID Numbers

To generate Computer ID Numbers, you must first specify the algorithm(s) to use. This is done by adding together the COMPNO_xxx constants (or applicable values) shown in the previous table. To choose WINPRODID and HDSERIAL, the algorithm value is COMPNO_WINPRODID + COMPNO_HDSERIAL or 128 + 2 = 130.  Some algorithms need a filename or a drive letter, as shown in the following table.





Local drive letter (network drives not supported)


Network drive letter or UNC path (local drive letters not supported)


Server host/dns name, IP address, or UNC path.


In the DLL/LIB interface, the Computer ID Number is generated by the function pp_compno() which has parameters for the filename and drive letter. In the ActiveX interface, the properties CPAlgorithm, CPAlgorithmFile, and CPAlgorithmDrive are first set and the Computer ID Number is obtained by the property CPCompNo. Note that if you are using EZ Trial, these properties are automatically set through the EZ Trial Parameters tab in LFEdit.

Computer ID Thresholds

A Computer ID Threshold (pp_copycheckth() in DLL interface and CPTolerance in ActiveX interface) can be used to filter out minor Computer ID Number changes due to hardware changes and upgrades. The default threshold for legacy algorithms is 100; however, this threshold value is too high for Enhanced Computer ID Algorithms.  If you are upgrading from the Legacy Computer ID Algorithms, please review additional information regarding Enhanced Computer ID Algorithms to learn more about the "system of voting" and affiliated "thresholds" associated with this new algorithm.

Concept Link IconActiveX Related TopicsConcept Link IconDLL Related Topics