If Windows on the laptop was pre-installed when you got it then you cannot use the SSD in another machine, it won't activate.
You can try installing the SSD in the desktop and if it boots, you can buy a retail Windows key for it and just change it so it activates.
If it doesn't boot then you are going to have to do some messing around and repair the installation. Hit or miss in my experience.