First of, windows don't put the code on the CD and 2nd codes don't expire.
You've either got an illegal copy or MS has blacklisted your code and you need to call them.
It must be a restore disk that was provided with the computer if the key is on the disk. OEM's put an install script in the unattended folder on the CD so you don't have to do anything to restore your installation. The only thing I can think of is that your installing it on different hardware to what the disk was provided with.