Install HTC Sync
Before you commit yourself to actual unrooting work, you have to download and install HTC Sync. Make sure you download it from the official website of HTC desire. A number of third-party developers have applications available but try those which are available for HTC desire. Otherwise, the official website of the company is the best available option.
Writing Down Software
After you downloaded HTC Sync, go to settings in your phone handset. Click on About Phone, and then software information. After you are done with this, write down the software or build number. Both are the same and you should not face any problem in doing this step. Try to do it from beginning again if somehow you are interrupted before completion.
Next step for you is to go online and find a ROM that matches your software number. You will need to download the ROM to your phone. You will need to push Control plus F to find and download it faster.
Connecting Your Phone to PC
After you have downloaded find and downloaded a ROM that matches your software number, connect your mobile phone handset to PC or laptop with the USB, and run the .exe file and follow the instructions. It is simple and easy job done for you provided you follow all instructions and do not get confused with offering a flood of options from open online sources.