If it is the windows that came with the laptop, the oem key is tied to the laptop. If the hdd works, windows will be in a 30 day trial period til you get a new key. It may not work because you can run into driver conflicts which cause crashes. In which case the only solution is a clean install. By the way, you can legally download windows 7 if it is having issues. It'll be in the same 30 day trial period until you get a key but it'll be a clean install.