How to uninstall an application when it does not appear in Add/Remove Programs


One of the questions I commonly receive from customers is how to uninstall a product when there is no entry created for that product in the Add/Remove Programs control panel.  I get asked this question about a lot of different MSI-based setups and OS hotfixes, particularly from people who are trying to follow the uninstall instructions for beta versions of VS 2005 and the .NET Framework 2.0.


For MSI-based products, I typically recommend using the following steps to locate and remove a product that does not appear in Add/Remove Programs:



  1. Use these steps to download and run the MsiInv tool to create a list of applications that Windows Installer thinks are installed on the computer
  2. Open the MsiInv output file, locate the product that you are interested in removing and copy the Product Code value to your clipboard.  The Product Code will be a GUID with curly braces surrounding it.  Make sure to copy the curly braces in addition to the GUID value
  3. Go to the Start menu, choose Run and type cmd
  4. From the cmd prompt, run msiexec /x {product_code} using the Product Code value from the MsiInv output and try to uninstall it using the standard MSI uninstall command line
  5. If the uninstall succeeds, you can stop here
  6. If the uninstall did not succeed, download the smartmsizap tool (if you are interested, you can read about the behind-the-scenes design for smartmsizap here) and extract it to c:\ on your computer
  7. From the cmd prompt, run c:\smartmsizap.exe /p {product_code} using the Product Code value from the MsiInv output

This set of steps has resolved nearly all cases I’ve run into in the past where someone needed to remove a product but could not find an entry in Add/Remove Programs to launch the uninstall process from.  If you try these steps and run into problems or have questions, please contact me and I will try to help.


For OS hotfixes, you need to make sure the Show updates checkbox is checked in the top middle of the Add/Remove Programs control panel.  If that is checked and the hotfix you want to remove still does not appear in Add/Remove Programs, the hotfix may have been installed on your system with a command line that suppresses the ability to uninstall.


<update date=”1/9/2006″> Added more specific information about extracting and running smartmsizap.exe from c:\ because otherwise Windows may not know where to find the exe when running the command from a cmd prompt </update>


<update date=”4/1/2009″> Fixed broken link to smartmsizap tool. </update>


 

Comments (39)

  1. Thanks for this great post. It really helped.

  2. aKASH aGGARWAL says:

    I was about to format my disk after those headaches with CTP builds and release install when finally your article saved my day.

    Thanks a lot

  3. Promod says:

    Thanks a lot.

    I had to go till the 6th step using smartmsizap, inorder to uninstall the beta versions of SQL Server.

    There was an error when I tried to uninstall SQL Server 2005 CTP using 4th step (msiexec /x {product_code}). A message which shows an error in machine configuration file and an error in XMLReader was poped while doing that. A part of the error is described as follows.

    The setup has encountered an unexpected error in datastore. The action is SetInstancePorperty. The error is: Source File Name: datastorecachedpropertycollection.cpp .

    ……

    There was an XmlRW error: failure loading xmlrw.dll

    Thanks,

    Promod.

  4. I used a software called Uninstaller! 2006 ( http://www.ursoftware.com ) to remove all the previous versions of .NET Framework. It removes all the registry entries and hence your system is completely cleaned.

  5. Ciro Theodoro says:

    I used the MSInv trying to remove Microsoft SQL 2005 CTP but it didn’t work. When I used the smartmsizap command, it worked!!! I was almost giving up when I found this article. Very good tips!!! Thank you very much!!!!

  6. Moorthi says:

    Great Aaron, thanks for quick reply. SmartZap worked for me.

    And I’m really glad Microsoft support for Developers.

    Last 2 days, I’ve started working with Netbeans as I everything is free there, but its bad practice to map the namespace with folders, ‘coz. I’m back now.

    Thanks again.

    -pv

  7. Steve Shier says:

    Dear Aaron:

    I’m having a lot of problems installing SQL 2005 RTM on my WinXP SP2 machine.  I think it may be because of manually uninstalling SQL 2005 CTP and/or VS 2005 Beta 2.0, probably in the wrong order. The error I get in the detail log file SQLSetup0019_COMPUTERNAME_SQL.log is "Error 29528. The setup has encountered an unexpected error while Updating Installed Files. The error is: Fatal error during installation.".

    I uninstalled both beta products (SQL 2005 CTP and VS 2005 Beta 2.0) manually, then installed the VS 2005 RTM and it seems to work fine (I also have VS 2003 and VS 2002 installed on this box).I tried running msiinv but I see nothing

    related to SQL Server installed.  I tried running Windows Cleanup Utility (msicuu2.exe) but also saw nothing related to SQL.  I looked in the registry and saw under hklmmicrosoftmicrosoft sql server an 80 folder and a 90 folder.  

    The 80 folder was related to a prior SQL 2000 install which I believe was removed when I installed the SQL 2005 CTP.  There are no instances showing up in thesse registry keys.  I also looked in services and find no sql related services running. I also removed left over folders and files at C:Program FilesMicrosoft SQL Server prior to install (I did save them elsewhere so I have all the install logs).  

    Thanks for any help you can give me.

    Steve Shier

  8. astebner says:

    Hi Steve – Can you please contact me at Aaron.Stebner (at) microsoft (dot) com and zip and send me the log files located at %ProgramFiles%Microsoft SQL Server90Setup BootstrapLogFiles so I can try to take a look and see if I can figure anything out?

  9. Kendo says:

    I uninstall it from youtunsinstaller, but during the work, the computer reboot

    No more uninstall link

    I have followed the manual uninstallation tips.

    When I try to install the new version, it bloc saying : it is allready install …

    I see the smartmsizap.exe" /p

    and try {.NET Framework 2.0} but it doesn’t work, what is the product code ????

    Thx for help

  10. astebner says:

    Hi Kendo – You need to use the MsiInv tool linked in step 1 above to determine the product code.  Can you please try that out and see if you can figure it out from there?

  11. A customer contacted me this week after reading my blog post about uninstalling beta builds of VS 2005…

  12. panzerkunst says:

    hi Aaron

    Thanks for this post. Unfortunately I’m not able to download the smartmsizap tool… Is it still online ?

    Thanks

  13. astebner says:

    Hi Panzerkunst – Currently, the server I use to host all of the tools that I have posted for download is down for maintenance, and it unfortunately has been down for a couple of days now.  Please contact me using http://blogs.msdn.com/astebner/contact.aspx and I will send you a copy of the tool via email as a workaround.

  14. Cass says:

    Hi. I installed visual basic beta 2 and had given up until I finally found this information. The uninstall tool was giving me some XML error and would not finish the uninstall. Once I ran your information here the betas autouninstall completed and when I ran your msiInv tool the programs didn’t show up anymore however the folders "Microsoft SQL Server" and "Microsoft Visual Studio 8" and its files are still in my programs folder and when I startup my computer "sqlservr.eve" is running. Please help I don’t know what else to do.

  15. astebner says:

    Hi Cass – The MsiInv and SmartMsiZap workaround is designed to remove the beta version so that you can install the final release of the product.  This workaround does not remove all of the files for a product though, so that would probably explain why you still see those folders.  Is your goal to install the final release or to just remove the beta?  If you want to install the final release, I would suggest installing it now.  If you want to only remove the beta, I would suggest manually deleting the SQL Server service and deleting the folders you mention above manually.  Hope this helps….

  16. Cass says:

    Hi, my goal was not to install the final release but to remove it all together. I didn’t want to remove the folders without being sure that if I did I wouldn’t start getting some system error because sqlservr.exe seems to run on its own. Also, I wanted to make sure that I removed all the files that may have been installed in other directories associated with it so that I wouldn’t have all these extra files still on my computer. Thanks for your help.

  17. iafossi says:

    Hi, Aaron

    Because of a problem with my anti virus, I had to uninstall Visual Basic Express Edition (and .Net Framework 2.0, MSDN, and optional SQL that was installed during VB installation). Unfortunately, I uninstalled first .Net Framework 2.0 and after I realized that it had to be installed to be able to uninstall VB, so I re-installed .Net Framework 2.0 back and continue uninstalling the rest. At the end, I uninstalled .Net Framework 2.0.

    After that, I tried to install again VB and optional SQL (now with the anti virus disabled, that was the problem in my first installation). But this second time, I was not asked if I wanted SQL installed (the first time, I was asked about SQL and I said yes). So, I do not have SQL installed, although I see a lot of folders and files related to SQL. I look in Control Panel -add/remove programs- and nothing related to SQL appears.

    Can you tell me how to force the installation of SQL? If not possible, are MsiInv and SmartMsiZap tools good for uninstalling everything again and reinstall once more? I have the CD burned from the ISO image file downloaded from Microsoft.

    Many Thanks in advance for your help.

  18. astebner says:

    Hi Iafossi – I would suggest first trying to download and install SQL Express directly by using the link at http://msdn.microsoft.com/vstudio/express/sql/download/.

    MsiInv and SmartMsiZap would probably help here, but it would be more reliable for you to try to repair SQL Express using the official setup package first.

    Hope this helps!

  19. iafossi says:

    Many thanks, Aaron

    I will try your suggestion and let you know the result.

    Ignacio

  20. iafossi says:

    Hi Aaron

    I downloaded and installed SQL Express directly following your advise and it seems that everything is right now. Many thanks for your help.

    Ignacio

  21. Where to get Visual Studio 2005 and the .NET Framework 2.0 Where to download the .NET Framework 2.0 redistributable

  22. JamesNoe says:

    OK I tried the steps you gave me to run MSIINV then MSIEXEC then SMARTMSIZAP and they all indicate that they worked on the visual web developer to uninstall … BUT I still get the error that it needs to be uninstalled before SP1 of VS 2005 can be loaded. When I go into the VS 2005 and look at help/about it still shows the Visual Web Developer 2005 and Web application Projects 2005 in the Installed products. I reran the MSIINV and did not see those products in the list. I did see the VS 2005.

    What am I doing wrong here?

    Jim Noe

  23. astebner says:

    Hi JamesNoe – Please make sure that you have uninstalled the Visual Studio 2005 hotfix for web application projects (KB915364) in addition to the web application projects package itself.  Both items that you need to uninstall are listed at http://blogs.msdn.com/astebner/archive/2007/02/11/uninstall-vs-2005-update-to-support-web-application-projects-before-installing-vs-2005-sp1.aspx.

    If that doesn’t help, I have heard of cases where customers were able to resolve this issue by reinstalling the web application projects package and the Visual Studio hotfix and then uninstalled them again.

    If both of the above fail, you might need to uninstall and reinstall VS 2005, but hopefully you’ll be able to avoid doing that.

    Hopefully one of these will help.

  24. As described in this post on S. Somasegar’s blog and in other places, Visual Studio codename Orcas beta

  25. Recently, I heard from a customer who has a system with Update Rollup 2 for Windows XP Media Center Edition

  26. Meta-Code says:

    Visual Studio 2008 – Install Problem Solved

  27. General info, best practices 907284 – Changes to the readme file for SQL Server 2005 910229 – SQL Server

  28. gambleleon says:

    Hats off! Show some respect!

    It does the best job I’ve seen yet with Kodak’s suite of EasyShare products, (EasyShare, Home Center and Digital Display software.) The Kodak Clear is marginally more complete, but it uses msiexec to try to remove upwards of 90 product codes, so it sometimes fails. (Rarely, but these things do happen!) I’ve created a batch file that runs smartmsizap.exe /p {Product code} /qn for all 90 guids. After it runs. When you reinstall, you get the option of Modify, repair or remove, so there are scraps left behind, but overall, it’s a very good tool!

  29. You can use these docs for uninstalling your 2005 sql instance based on your requirement. Uninstalling

  30. Touching too many pieces at once almost always causes errors and that became evident when I began to

  31. Luke Venediger says:

    Thanks so much – this saved me a whole afternoon of pulling my hair out.

  32. anil says:

    we can use recommended uninstaller like mirekusoft (www.mirekusoft.com) or revo to uninstall applications on Windows. It can help solve problems that are caused when a program does not uninstall properly.

  33. shivam says:

    Hi,

    I installed OfficeScan Server on my machine.I am trying to uninstall it and cant do it.Its visible in the add or remove programs and even as a menu item but there's no Product Code GUID for it and some I am not able to use the fix it tool.

    I used msiinv.exe and it showed no key for Trend Micro.

    Please guide me through….

    Thanks a lot.