It depends.
If you have a "retail version" of the disc, you may be able to transfer the activation license.
If it's a "system builders" disc, you may not.
If this is a computer that originally came with Windows 10, there may not be Windows 7 drivers for all its parts.