You are viewing knowbody

Thu, Oct. 22nd, 2009, 01:11 pm
Uninstalling "IronPython 2.6 CTP for .NET 4.0 Beta 1" without .NET 4.0 Beta 1 Installed

We've heard from a few people in the last week that they're having trouble uninstalling our community technology preview of IronPython running under .NET 4.0 Beta 1 if the installation of .NET 4.0 Beta 1 has been removed or replaced in some fashion.  Basically what's going on is that a prerequisite for running IronPython.msi (whether you intend on installing/repairing/removing it) is the presence of a very specific version of .NET - namely v4.0.20506.  The tie in to this .NET 4.0 release means that even with an install of .NET 4.0 Beta 2, you'll be unable to remove the IronPython CTP for Beta 1 cleanly unless you also have .NET 4.0 Beta 1 installed concurrently (is this even possible I wonder...).

There's at least one alternative to removing "IronPython 2.6 CTP for .NET 4.0 Beta 1" if you no longer have access to .NET 4.0 Beta 1 on your machine.  Basically you'll just need to remove the related installation directory and shortcut menus by hand.  Also, there's those pesky registry entries that don't have to be removed, but can be if you prefer. 

Disclaimer
While the info presented below on removing "IronPython 2.6 CTP for .NET 4.0 Beta 1" without using the uninstaller from the Control Panel should work on just about anybody's machine, the steps were tested on a single 32-bit Windows 7 machine.  There's at least a trillion ways your machine(s) may vary from the test box, and not only may some steps not work...they could even hurt your machine!  Proceed with caution...

Step 1 - Remove the Installation Directory
Assuming you accepted the default installation directory for the CTP, you'll have either "%ProgramFiles%\IronPython 2.6 CTP for .NET 4.0 Beta 1" or "%ProgramFiles% (x86)\IronPython 2.6 CTP for .NET 4.0 Beta 1".  Simply open a command prompt as an Administrator and remove this directory:
    rmdir /s /q "%ProgramFiles%\IronPython 2.6 CTP for .NET 4.0 Beta 1"

Step 2 - Remove the Shortcut Menu
The shortcuts to the CTP's ipy.exe should be in "%ProgramData%\Microsoft\Windows\Start Menu\Programs\IronPython 2.6 CTP for .NET 4.0 Beta 1".  Verify the presence of this directory, open a command prompt as an Administrator again, and remove the directory:
    rmdir /s /q "%ProgramData%\Microsoft\Windows\Start Menu\Programs\IronPython 2.6 CTP for .NET 4.0 Beta 1"

Step 3 - "Fix" the registry
Background: as of today no IronPython release uses *any* information found in the registry.  There's .NET key/value pairs that could affect the runtime behavior of IronPython (e.g., NGen'ing), but these are not directly utilized by IronPython.  In effect, the only reason to follow this step is to remove "IronPython 2.6 CTP for .NET 4.0 Beta 1" as an option from the "Add/Remove Programs" portion of the Control Panel.  While the previous steps have very little chance of screwing up your machine, most people know that messing with the registry can cripple your box if you're not careful.  If I haven't scared you off yet...

  1. Run "regedit" from an elevated command prompt
  2. Press Ctrl-F and do a search on "IronPython 2.6 CTP for .NET 4.0 Beta 1". Keep searching (via the F3 key) until you find something like Computer\HKEY_CLASSES_ROOT\Installer\Products\70089FC31E5E8B340817C3CA5F82E45D containing keys such as ProductName, Version, etc.  Remove the directory which contains these keys and "IronPython 2.6 CTP for .NET 4.0 Beta 1" will be uninstalled as far as the Control Panel is concerned
  3. There are other keys in the registry with respect to the CTP Beta 1 release.  My guess is that these are perfectly harmless to remove, but I wouldn't advise removing them