you may install the HDD in another computer (in case it’s a desktop system you need an adapter) and do a basic Windows install (including latest service pack). Place drivers into a separate folder (like C:\drivers) on that HDD. Don’t activate Windows yet (assuming, it’s XP).
Also read the information about the sysprep tool on Microsoft support website.
Then reinstall the HDD in the original computer.