Uninstalling Visual Studio 2005


Hi there.  Well,  I’ve had some fun and games uninstalling Visual Studio 2005.  Since Visual Studio 2008 went RTM recently, I’ve been running both VS2005 and 2008 side-by-side.   This actually seems to work fine.

However, hard drive space on my tablet PC is at a premium (being that the drive has a volume of only 55GB).  So I wanted to uninstall VS2K5 and commit to VS2K8 fully.

Now here’s the thing, I’ve had a lot of trouble with broken MSI/Windows Installer.  Seems VS2K5 is in no hurry to leave.

If you also get stuck in this predicament, I offer the following possible fixes.  It took a combination of the following.

WARNING: You should only attempt to manually uninstall a suite the size and complexity of Visual Studio if you are an experienced developer or IT Pro.  This is not recommended for novice users due to the risk/severity if the steps fail.  Do so at your own risk.

1. If Uninstall (from the original installation media or from Add/Remove Programs) does not work (gives you an odd error message when running the maintenance mode installer) then you’ll need to remove it from the registry or use Windows Installer Cleanup utility.

2. You can try to manually delete files from the Program Files\Microsoft Visual Studio 2005 directory.  There’s a BHO (Browser Helper Object) in a sub-sub-sub directory, so you’ll need to unregister it first before proceeding.  See notes later in how to unregister BHOs.

3. Download and use CCleaner.  This will remove invalid registry keys (once step #2 is complete).

Once you’ve managed to get all this done, re-run the installation for VS2K5.  I picked Full install.  Re-install then uninstall – this should remove any common files which you weren’t able to remove by hand.

This’ll take a little while, so be prepared to lose an hour or two if you’re mad keen to free up the hard drive space.

Naturally, you should remove all VS2K5 dependencies (LINQ Preview, SDKs etc etc) before you try to remove VS.

Notes

Removing Unwanted Browser Helper Objects and COM Objects (Generic Guide).

Ensure all applications are closed before doing this.

First, find out the directory and file name that the BHO exists in.  This is usually files you can’t delete (any DLL which reports as being ‘in use’ when you try to delete files or folders through Windows Explorer).

Next open a command prompt (type ‘cmd’ in the Start->Run dialog).  Change directory (cd) to the location of the COM or BHO object. 

Next Open Task Manager (right click on the task bar and select Task Manager or Press Control + Alt + Del and select Task Manager).  Click on the Processes Tab.  Select "explorer.exe" and click on the End Task button.  Select ‘Yes’ to confirm.  Windows will lose any open explorer dialog (windows) as well as the system tray and task bar – do not be concerned.

Enter into the command window ‘regsvr32 ‘ + name of BHO or COM file + ‘ /u’ then press enter.  The COM or BHJO should be unregistered.  Next type ‘explorer’ into the command window and press enter.  If you want to view the current location, type ‘explorer .’

Now all windows should be restored and the BHO or COM DLL should be unlocked and yo can rename or delete the file.


About Rob Sanders

IT Professional and TOGAF 9 certified architect with nearly two decades of industry experience, 18 years in commercial software development and 11 years in IT consulting. Check out the "About Rob" page for more information.

Leave a comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>