Cleaning Up Old Avalon Installs


If you’re upgrading to the latest version of Avalon (I really should start to call it Windows Presentation Foundation, I know, but I want to make sure that search engines find blog entries like this for both the codename and the final technology name), you might find that there’s some old cruft on your machine lying around that causes you problems during the installation process. Dan Mohr, an SDE/T on the team explains further:



“With the PDC bits, the Windows Presentation Foundation installer does not force overwrite existing files.  This may cause problems if you have files from previous Windows Presentation Foundation builds left on the machine. This problem is compounded by a bug in some earlier versions (before the May CTP) that caused the shared DLL reference counts in the registry to not be correctly decremented during uninstall leaving some shared files on the machine.”


Dan has written a small shell script that will remove existing Avalon files and ensure that the shared DLL reference counts in the registry are removed.  Note that this script should only be run after uninstalling all previous Avalon builds, otherwise you’ll wind up with a half-complete installation that is hard to remove. To run Dan’s script, download this JavaScript file and execute it with cscript.exe as follows:

   cscript cleanupSharedFiles.js


Welcome to the world of pre-beta software – if you think this is painful, you should try running daily builds 🙂


Comments (5)

  1. Anonymous says:

    This didn’t work for me…I still get this message:

    You must install v2.0.40607 of the Common Language Runtime before installing Microsoft "Avalon" CTP.

    …this happens when trying to UNINSTALL this package.

  2. Anonymous says:

    I’m with Mark. This is pissing me off, really. Nowhere do you get told you have to "uninstall in a specific order" until you try to install a newer release of WinFX. After that point, it’s already too $&#@$*#@ late, as I /upgraded/ .NET first.

  3. Anonymous says:

    I’m having Mark’s problem. Can’t install the 2.0 beta 1 framework either. Argh! HELP!!!

  4. Anonymous says:

    By my reckoning, the most recent Feb 2006 CTP of WinFX represents the eleventh public release for Windows…

  5. Anonymous says:

    I was having the same problem

    I used this tool to remove the old Avalon bits. I also ran the script for safe measure.

    http://support.microsoft.com/default.aspx?scid=kb;en-us;290301

Skip to main content