Read this here first and see if it helps you abit:
Error code 49 may be displayed if the system hive exceeds its maximum size and all new devices fail to work until this size is brought down:
“Windows cannot start new hardware devices because the system hive is too large (exceeds the Registry Size Limit). (Code 49)“The system hive is apart of the Windows registry and is associated with files that comprise configuration information related to applications, user preferences, and devices on your computer.
This problem usually occurs if the devices that are no longer connected or installed on your computer are listed in the system hive.
In order to fix this problem you will have to locate these no longer used hardware devices in Device Manager and then uninstall them. To do this, perform the following steps:
1.Click the Start button, select Run, type CMD in the Open box, and then click the OK button to display the Command Prompt window.
2.At the prompt, type the following and press Enter.
3.Open the Device Manager window.
After setting the above environment variable, you will now be able to see your old and no longer used devices in the Device Manager window as well.
Have a look at this to for code error 39, it's relating to your dvd or hdd drive.
Explanation of error codes generated by Device Manager in Windows XP Professional
4.To reduce the size of the system hive, remove all unwanted hardware devices from the computer. If there is some problem with a particular device, you may have to uninstall and reinstall it on the system.
Note: After you complete the above step, it is recommended that you use a reliable registry cleaner tool to scan and remove all unwanted data from the registry. Next, compress the registry by defragging it by using the registry defrag feature.
If the above tasks do not enable you to resolve error code 49, you may be forced to reinstall the operating system to resolve the error.
To prevent driver problems from occurring on your computer, it is recommended that you maintain a healthy and compact system registry. You can do this with the help of a reliable registry cleaner tool. You must also keep your Windows and device drivers updated with the latest security releases and patches