What OS is this?
What are the parts, old and new?
2 considerations, Licensing and Operation.
Licensing/Activation
If Win 10,
Read and do this before you change any parts:
https://support.microsoft.com/en-us/help/20530/windows-10-reactivating-after-hardware-change
http://www.tomshardware.com/forum/id-3164428/windows-build-1607-activation.html
Operation
The eternal, daily, question...will is boot or won't it.
There are 3 possible outcomes doing this:
1. It simply boots up just fine
2. It fails completely
3. It boots up, but you're chasing issues for weeks.
You can try it, but be prepared for complete fail.
Changing major parts, a clean install is always
recommended, often
required.