Microsoft, like all other software companies, releases patches and hot fixes for its Windows operating system quite frequently.

Installing the latest patch or Hot fix is highly recommended if you want to keep your installation in tip-top shape.

These patches are mostly harmless but there are times when your current configuration, hardware or software might not be compatible with a particular patch and you find that out only when your system starts misbehaving after you've applied the patch.

The new patch might not be compatible with your current hardware. An ancient software that you still use and love might stop working with the new patch. In times like these, one really wishes that Microsoft had a built in patch rollback mechanism. Are you one of those wishing for such a feature ?

Well, the good news is that Microsoft already has mechanisms to roll back patches. The bad news is that the roll back procedure is just not that obvious.

Roll back a patch on Windows XP

If you're using Windows XP, browse to the Windows install directory, typically c:\WINDOWS and enable the hidden files view using the Tools -> Folder Options menu option.

You should now be able to see a bunch of hidden folders under the main c:\WINDOWS folder. All the folders which have names of the form of $NTServicePackxxxx, $NTUninstallxxxx and $NTUninstallKBxxxx are folders corresponding to the different patches that you've installed.

The folders with KB in their name followed by a 5 or 6 digit number are hot fixes which Microsoft has released in response to a bug and the number denotes the corresponding Microsoft knowledge base article associated with that hot fix.

Now, to uninstall a particular patch, go inside the folder corresponding to that patch. You will see another folder named spuninst. Inside this folder will be a Windows setup executable of the same name.

This is the Uninstaller program for the particular patch that you're browsing right now. Just run the program and the patch will be rolled back and your system will be as pristine as it was before you applied the patch.

Roll back a patch on Windows Vista

I am using Windows Vista on my primary work machine these days and on this machine, I couldn't find the $NTUninstall folders but I found another way to roll back patches on Vista - System Restore.

Windows Vista, by default, takes a snapshot of a system before applying any patches using a feature called System Restore.

To roll back a patch using System Restore, click on the Start menu and start System Restore using the All Programs -> Accessories -> System Tools menu item.

System Restore is a wizard based utility which lets you chose the restore point and brings the system back to the chosen state.

If you want to restore your system to a point earlier than the recommended restore point, then select the second radio button and you will be able to see a list of the restore points Vista has available for you to roll back to.

This is definitely the easiest method to roll back a wayward patch or hotfix.

Have you guys ever had to roll back a patch ? How did you do it ? Let us know in the comments.