|"I just need the activation code, but since Windows is corrupt, I can't log onto the desktop to use a program to find the code as I've seen."|
The "activation code" is the Product Key.
You cannot find an existing Product Key that a Windows installation is using unless Windows is working.
If you have a brand name computer, an acceptable Product Key is on the official Microsoft label on the outside of the computer case.
If you have a generic desktop system, the official Microsoft label is supposed to be on the outside of the computer case.
You can't use a Windows Re-installation CD for a brand name system computer model with your computer to run a Repair installation of Windows or to install Windows from scratch unless your model is the same.
There are two ways you can fix your problem - the second one does not need the Product Key.
There are 4 possible error messages you can get - the following mentions what may be an error that is worded differently but the procedure for you is the same.
For an answer about what to do about it, see response 3 in this (emachines system):