Service pack and hotfix uninstall uninstall

Wed, 2007-07-18 11:48 by admin · Forum/category:

How can I uninstall (remove) a service pack uninstall entry in Control Panel,
Add/Remove Programs?

If you think the duplicated "uninstall" in the title is a typo, think again. We are talking about uninstalling an uninstaller.

If you have a Service Pack installed and used for a while and are absolutely sure you never want to uninstall it again, you can free some disk space by removing the uninstall information for other hotfixes that still resides in subfolders of your main Windows folder. They are named something like %windir%\$NTUninstall...$, where %windir% stands for the name of your main Windows folder and the ... stands for some other text and possibly a number.

Older %windir%\$NTUninstall...$ folders can be deleted. The reason why a Service Pack installation doesn't remove them is that you may want to uninstall the service pack and then uninstall the earlier hotfixes, one by one.

The following folders can be deleted if they predate the Service Pack, i.e. if they carry older dates (or were belatedly installed before installing the service pack):

  • %windir%\$xpsp1hfm$\
  • %windir%\$NtUninstallQ...$\
  • %windir%\$NtUninstallKB...$\

Finally, if you are sure you never want to uninstall the service pack, you can delete: %windir%\$NtServicePackUninstall$\

Please see the chapters below for details.

UninstallRemover tool

This tool has been tested after the installation of Windows XP Service Pack 3 (SP3) and has so far worked well. If you have done it too, please add a comment below and report your experience.

To remove all hotfix uninstallers before and after any service pack, you can use this tool, which is more convenient, because it removes the uninstall folders and also the corresponding entries from the Add/Remove Programs list. If you have had the hotfixes installed for a while and are sure you never want to uninstall any of them again, you can use this tool, particularly just after you've installed a new service pack and found that it works perfectly well.

Attention: This tool removes all hotfix uninstall functions indiscriminately. It is best used after a new service pack has been installed, thoroughly tested, and is ready to be kept for good.

Like some other tools mentioned on this web site, this one was programmed by my fellow MVP Torgeir Bakken from Norway. Here it is: UninstallRemover.vbs

When you click on the link above, then approve and run this program, it will present yet another messagebox to allow you to abort the program before it begins to remove your uninstall folders.

If you want to remove the uninstall folder for the service pack itself, you still have to do that by hand, then remove it from the Add/Remove Programs list by attempting to uninstall, then allowing to remove the entry from the list, as follows.

Step 1 – Delete the $NtServicePackUninstall$ (or similar) folder

Because these files are in a hidden folder, you may have to go into My Computer or Windows Explorer and select Tools, Folder Options. Select the View tab and change the Hidden Files and Folders setting to Show Hidden Files and Folders.

You can now see the $NtServicePackUninstall$ folder in the Windows (or WINNT) folder. Delete the folder. You will receive a warning that you're about to delete a hidden folder. Choose Yes.

Because the total file size can be over 100MB, you may receive a message that the files are too large for the Recycle Bin. Choose Yes and delete them anyway.

If you like, you can go back to My Computer or Windows Explorer, Tools and Folder Options, and select the Restore Defaults button to set the option to show hidden files and folders back to the default.

Step 2 – Try to uninstall the service pack or patch in Control Panel, Add/Remove Programs

To remove the uninstall information in Control Panel, Add/Remove Programs, click on each and choose to uninstall the patch. It will then tell you that the uninstall folder could not be found and offer to remove the patch from the list as well. Do this only for those patches where you have actually deleted the folder and do not accidentally remove any new patches that were installed after the service pack.

You will notice that, obviously, uninstalling is no longer possible. But you will be given the option to remove the service pack from the list anyway. Accept that option, say Yes, and the service pack removal entry will be removed.

A similar information can be found in:

Q290402 - How to Remove Service Pack Restore Files and Folders in Windows
http://support.microsoft.com/kb/290402/

UninstallRemover.vbs Prevents removing last months hot fixes ! !

Sun, 2009-03-08 20:31 by alan_b

This has just removed :-
R:\WINDOWS\$NtUninstallKB960715$
R:\WINDOWS\$NtUninstallKB958687$

They are two new security patch hotfixes installed on 23 Feb 2009.

For two whole weeks I have seen no problems,
BUT it seems a little premature to decide they will not have to be UN-installed ! !
Google found several posts that show BOTH these hotfixes have caused major problems,
and some people had to un-install them.

Did UninstallRemover.vbs make a terrible mistake,
or is there a valid reason to prevent un-installing new hotfixes which cripple some systems ?

Is it possible that recent history caused confusion to UninstallRemover.vbs ?
Just before Christmas XP Home was upgraded from SP2 to SP3,
which probably removed many ancient $NtUninstall...$
Additionally Silverlight also got installed at that time
Last week I decided Silverlight was a security risk so I un-installed it.

In addition to $NtUninstallKB960715$ and $NtUninstallKB958687$
there were four off ancient (i.e. December 2003) $NtUninstallQ...$ folders removed.
In total these six items take 8.9 MBytes.

I am happy for 5 year old items to be zapped, but I will not risk two week old items,
therefore after I have posted this warning of a possible problem,
I will restore the disk partition image I made before running this test.

It would be a nice enhancement to UninstallRemover.vbs if it gave me the chance to forbid removal of individual items.
Alternatively would I successfully retain selected items by temporarily changing "$NtU..." to "$NUt..." before running UninstallRemover.vbs ?

Regards
Alan

UninstallRemover prevents the removal of all hotfixes

Sun, 2009-03-08 21:31 by admin

That's the stated purpose of the program. It is obvious, clearly documented, and should surprise no-one. Moreover, before the program runs, it asks you once again whether you really want to remove all these uninstallers. Here is again the relevant paragraph from the documentation above (emphasis added):

To remove all hotfix uninstallers before and after any service pack, you can use this tool, which is more convenient, because it removes the uninstall folders and also the corresponding entries from the Add/Remove Programs list. If you have had the hotfixes installed for a while and are sure you never want to uninstall them again, you can use this tool, particularly just after you've installed a new service pack and found that it works perfectly well.

To ask the program to remove the uninstall functions and then complain that it removed the uninstall functions is kind of ridiculous. Gave me a good laugh. grin

Since the source code is open and included, anybody could enhance the program. Please upload the enhanced program here, so everybody can benefit.

Thank you for adding the

Tue, 2009-03-10 20:53 by alan_b

Thank you for adding the extra emphasis that was omitted from the original description.

I am sorry I came here at the end of a busy day, and was confused by
"This tool has been tested ..."
What tool? I see no tool. What is it called?

In my confusion I rapidly read and overlooked the crucial significance of
"To remove ALL hotfix uninstallers ..." until I found the link to UninstallRemover.vbs.

At that point, without re-analysing the write-up, I decided to test this tool.
This tool behaved in a harmful way I had not expected.
This tool gave me no feedback,
other than telling me the number of folders it had deleted,
after it was too late for me to stop it ! !
I have been rather spoilt by tools and applications that show what they are about to do BEFORE they do it.

I recommend the addition of the words "ANY OF", and it should be emphasised as in
"If you have had the hotfixes installed for a while and are sure you never want to uninstall ANY OF them again,"
I was fully expecting a list of what was about to be removed,
a list which I could scrutinise, and make a considered judgement upon each candidate.

My computer suffered no permanent harm because earlier in the day I created a disc partition image in preparation for any unexpected disaster recovery requirements,
after which I was busy testing all the dangerous stuff I was interested in,
and after noting all results I restored the image to cancel every ill-effect,
ready to apply "for real" anything that seemed to give a benefit.

I thought it appropriate to post a warning in case any visitors to this site made the same mistake,
but without the benefit of being able to immediately restore a disk image.

I suffered no ill effects, and am not offended that my surprise "Gave you a good laugh."
Other visitors to this site might have different reactions.

Having re-read the write-up, I am of the opinion that
"To remove all hotfix uninstallers ..." does NOT necessarily denote an inevitable consequence,
it could also reasonably be understood as the maximum extent of its capabilities.

Finally, I have adapted for my own use published and proven vbs scripts,
but cannot bring myself to endanger others with an "enhanced" script that meddles with the registry.

I will however recommend
http://www.dougknox.com/xp/utils/xp_hotfix_backup.htm
This tool lists all the KB items it will delete BEFORE you make a "delete all"/"retain all" decision,
and at that point it reminds you that it is an all or nothing decision for free,
or for a $5 registration fee you have individual item selection.

Regards
Alan

Thanks for the link and the comment

Tue, 2009-03-10 23:07 by admin

I gladly recommend such a utility by fellow MVP (Microsoft Most Valuable Professional) Doug Knox. By the way, the tool on this web site was also written by an MVP. It is less elaborate, but entirely free. MVPs are a good source of Windows tools.

Most people do not want to retain any uninstall information, hence I think that a selective function is rarely needed, although you needed it. Nonetheless I have added a conspicuous warning.

Still I can only encourage anyone to enhance the program, whose Visual Basic Script source code is available here.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.