I am trying to create a unique CD-KEY to put in our product\'s box, just like a normal CD-KEY found in standard software boxes that users use to register the product.
Generate GUID and catenate a random number to it. GUID is guaranteed to be unique and random number will make it improbable to hit a code accidentally. Just don't modify the GUID in any way or you might compromise the uniqueness.