Aaron Stebner's WebLog

Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio

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

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

Rate This
  • Comments 39

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>

 

  • Thanks for this great post. It really helped.
  • 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
  • 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: datastore\cachedpropertycollection.cpp .
    ......
    There was an XmlRW error: failure loading xmlrw.dll

    Thanks,
    Promod.
  • 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.
  • 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!!!!
  • 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
  • PingBack from http://blogs.msdn.com/astebner/articles/492809.aspx
  • 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 hklm\microsoft\microsoft 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 Files\Microsoft 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
  • 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 Server\90\Setup Bootstrap\Log\Files so I can try to take a look and see if I can figure anything out?
  • 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
  • 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?

  • A customer contacted me this week after reading my blog post about uninstalling beta builds of VS 2005...
  • hi Aaron

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

    Thanks
  • 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.
  • 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.
Page 1 of 3 (39 items) 123
Leave a Comment
  • Please add 3 and 5 and type the answer here:
  • Post