Saturday, 18 August 2012

how to repair a corrupted .net framework 1.1 installation on a microsoft windows server 2003

OK so recently a friend of mine administering a windows server 2003 managed to corrupt his .NET framework installation. I decided to lend him a hand, and after a lot of searching this is what I found out:

The situation:

He tried to remove all .NET framework versions in order to install version 4.0. As it turns out, version 1.1 is part of the actual OS, and when he removed it, he didn't remove it completely, some registry key remained there, and the OS was thinking it had a fully working 1.1 version installed. As a result, when trying to reinstall the version 1.1 he was getting a message like "the product you are trying to install has already been installed as part of the OS" or something similar, because windows thought the framework is already installed. Also, any attempt to install any of the later versions of .NET framework were failing, the same when trying windows updates.

The solution:

It is outlined very clearly in this microsoft support page, and it did work. Took me some time to find it, hopefully this post will help someone else find it faster.

And because microsoft links have a tendency to disappear from time to time, here is the process in summary:

1. Delete netfx found in the registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\OC Manager\Subcomponents

2. in C:\Windows\inf make a file, call it sysnew.inf, with contents:

Signature = "$Windows NT$"


3. run this command:

sysocmgr /i:C:\windows\inf\sysnew.inf

4. Click next, if it asks for the files, download the SP2 for windows server 2003 (about 380 MB), extract it with 7zip and click browse to the folder i386 you just extracted.

5. Install assemblies in the global assembly cache (replace xxxx with correct version, in our case was 4322):

"C:\windows\Microsoft.NET\Framework\v1.1.xxxx\gacutil.exe" /f /il C:\windows\Microsoft.NET\Framework\v1.1.xxxx\assemblylist.txt

6. Run windows update to get any patches you need, and you should be all set.

I hope this post saves someone some time...

No comments: