You didn't say which OS but, since you mentioned upgrading, I'll assume that it's Win98.
Run regedit, then:
Click on HKEY_LOCAL_MACHINE
Click on SOFTWARE
Click on MICROSOFT
Click on WINDOWS
Click on CurrentVersion
On the right frame, scroll to find the entry " ProductKey "