2006-03-03

.NET Framework 2.0 Configuration Tool, Part 3

See part 1 and part 2 of this topic...

Discovered some more info on the .NET Framework 2.0 configuration tool. I was using various tools to try to figure out what the console was doing. Just running MSCORCFG.MSC would yield the following dialog:


Obviously, something more needed to happen to get the MMC snap-in to work. I profiled MMC.EXE with Dependency Walker, and also monitored the process with FileMon and RegMon. I wasn't turning up much information. Then, in Dependency Walker, I noticed that MMC loaded MSCORMMC.DLL. MSCORMMC.DLL exported DllRegisterServer and DllUnregisterServer, so I figured that I needed to register the MSCORMMC.DLL with RegSvr32.

Running "regsvr32 mscormmc.dll" yielded the following series of dialogs:





After thinking a bit, I decided to extract the files from the .NET Framework 2.0 SDK and open up netfxsdk.msi in InstallShield. I don't know what Micosoft uses to author its installation programs, but InstallShield sure had trouble with it - 100% CPU utilization when moving from component to component. It took a while, but I finally determined that doing "regsvr32 mscormmc.dll" actually put the wrong registry entries in place.

What follows is a .REG representing the "correct" registry entries that the installation program for the .NET Framework 2.0 SDK apparently takes care of. Note that all 3 paths to MSCORMMC.DLL would need to be changed to reflect the system that this REG file would be run on. Also note that the REG file removes any existing settings that might be there - in my tests it wasn't enough to simply merge the correct REG settings with the garbage left by doing "regsvr32 mscormmc.dll" - the old settings actually needed to be removed.



Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\CLSID\{A22B5BA1-D8CF-4db6-BC91-CFC1A04E2469}]

[-HKEY_CLASSES_ROOT\CLSID\{D8FE614D-4851-4a72-998D-D1F2E750A050}]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MMC\SnapIns\{A22B5BA1-D8CF-4db6-BC91-CFC1A04E2469}]

[HKEY_CLASSES_ROOT\CLSID\{A22B5BA1-D8CF-4db6-BC91-CFC1A04E2469}]

@="Microsoft.CLRAdmin.CData"

[HKEY_CLASSES_ROOT\CLSID\{A22B5BA1-D8CF-4db6-BC91-CFC1A04E2469}\Implemented Categories]

[HKEY_CLASSES_ROOT\CLSID\{A22B5BA1-D8CF-4db6-BC91-CFC1A04E2469}\Implemented Categories\{62C8FE65-4EBB-45E7-B440-6E39B2CDBF29}]

@=""

[HKEY_CLASSES_ROOT\CLSID\{A22B5BA1-D8CF-4db6-BC91-CFC1A04E2469}\InprocServer32]

@="C:\\Utils\\NetFW20Utils\\mscormmc.dll"
"ThreadingModel"="Both"
"Class"="Microsoft.CLRAdmin.CData"
"Assembly"="mscorcfg, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
"RuntimeVersion"="v2.0.50727"

[HKEY_CLASSES_ROOT\CLSID\{A22B5BA1-D8CF-4db6-BC91-CFC1A04E2469}\InprocServer32\2.0.0.0]

"Class"="Microsoft.CLRAdmin.CData"
"Assembly"="mscorcfg, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
"RuntimeVersion"="v2.0.50727"

[HKEY_CLASSES_ROOT\CLSID\{A22B5BA1-D8CF-4db6-BC91-CFC1A04E2469}\ProgId]

@="Microsoft.CLRAdmin.CData"

[HKEY_CLASSES_ROOT\CLSID\{D8FE614D-4851-4a72-998D-D1F2E750A050}]

@="Microsoft.CLRAdmin.CAbout"

[HKEY_CLASSES_ROOT\CLSID\{D8FE614D-4851-4a72-998D-D1F2E750A050}\Implemented Categories]

[HKEY_CLASSES_ROOT\CLSID\{D8FE614D-4851-4a72-998D-D1F2E750A050}\Implemented Categories\{62C8FE65-4EBB-45E7-B440-6E39B2CDBF29}]

@=""

[HKEY_CLASSES_ROOT\CLSID\{D8FE614D-4851-4a72-998D-D1F2E750A050}\InprocServer32]

@="C:\\Utils\\NetFW20Utils\\mscormmc.dll"
"ThreadingModel"="Both"
"Class"="Microsoft.CLRAdmin.CAbout"
"Assembly"="mscorcfg, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
"RuntimeVersion"="v2.0.50727"

[HKEY_CLASSES_ROOT\CLSID\{D8FE614D-4851-4a72-998D-D1F2E750A050}\InprocServer32\2.0.0.0]

"Class"="Microsoft.CLRAdmin.CAbout"
"Assembly"="mscorcfg, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
"RuntimeVersion"="v2.0.50727"

[HKEY_CLASSES_ROOT\CLSID\{D8FE614D-4851-4a72-998D-D1F2E750A050}\ProgId]

@="Microsoft.CLRAdmin.CAbout"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MMC\SnapIns\{A22B5BA1-D8CF-4db6-BC91-CFC1A04E2469}]

"About"="{D8FE614D-4851-4a72-998D-D1F2E750A050}"
"NameString"=".NET Framework 2.0 Configuration"
"NameStringIndirect"="@C:\\Utils\\NetFW20Utils\\mscormmc.dll,-30"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MMC\SnapIns\{A22B5BA1-D8CF-4db6-BC91-CFC1A04E2469}\StandAlone]

@=""

(Let's hope the formatting of the REG file doesn't mess up the formatting of the whole blog...)
The files required are:
-- mscorcfg.dll
-- mscorcfg.msc
-- mscormmc11.cfg
-- mscormmc.dll

All files should be placed in the same directory (anywhere), but it appears that mscorcfg.dll also needs to be placed in the GAC. Again, note that the REG file above requires one to change the path to mscormmc.dll in 3 places to reflect the actual path to the DLL on the system on which the REG file is merged.

16 comments:

Anonymous said...

Thank you!!
After many installs and re-installs of .NET 2.0 SDK, including the one that comes with VS2005, it's YOUR registry file that saved me and made the .NET configuration tool run.

I kept getting weird "snap-in failed to initialize" messages from MMC, and thanks to you these are now gone.

Thanks again.

Frank said...

I also say: Thank you!!

It saved me a lot of time reinstalling vs2005, comparing registries and so on. It's a pity that one must revert to this kind of fixes, but that's life I guess.

Anonymous said...

This fix has saved me and my team so much time and hassle, thank you very much!

Anonymous said...

Hi there after reading your excellent explanation on how to get the Framework v2.0 Config tool to work I used your registry entries and created an installer:

http://www.oc3software.com/Downloads/Frmwrk_config_console_setup.exe

I hope this helps other users who need to access the tool that microsoft ditched from v2.0.
Not sure what the implications are so I will post it for a while before taking it down. Anyone who wants
to repost the install is free to do so.
if you want to contact me my email is: juliusheath@gmail.com
Any problems or questions let me know and I will try to fix them. It works on WIN2K/XP/VISTA so far but
you may find something I didn't.

Anonymous said...

You are all a godsend! I used the .exe from oc3software and it worked like a charm! Thank you!

Anonymous said...

I have written a DOT NET 2 Framework Configuration tool and it can be downloaded here http://www.performancemedia.com.au/Framework_2_Config_Tool.zip. Once it is installed, just go to "Control Panel\Administrative Tools" and you will see a link to the "Microsoft .NET Framework 2.0 Configuration"

«/\/\Ø|ö±ò\/»®© said...

Hi Anonymous that wrote "a DOT NET 2 Framework Configuration tool" (hosted at performancemedia.com.au),

Just to provide clarification...

Do you mean you wrote a TOOL, or you, like someone else, created an installation package containing pieces from the .NET FW 2.0 SDK?

«/\/\Ø|ö±ò\/»®© said...

To all:

Please note that while people are free to post links to their creations, etc. it does not mean that there is any endorsement (implicit or explicit) by me. Use them at your own risk.

Another consideration when using the approach outlined in the post (or when putting files on your system that have been pulled out of another package) is that any updates that Microsoft may release for the specific files will likely NOT be applied. After all, they wound up on the system via unsupported means... Not that any updates have been released, but if they would be the update / installation mechanism wouldn't know to look for the specific files and update them. If you got the config tool by installing the .NET FW 2.0 SDK, that would be a different story and I would expect any updates to be applied in that case. But the whole point of this exercise is to avoid having to install the entire SDK just to get the configuration tool, so...

Thanks for your continued readership!

Perplexed said...

This is perfect - exactly what I was looking for.
I just have one problem, when I tried to copy the mscorcfg.dll to the GAC I get the error that it must have a strong name.
There is a version 1.0.5000 assembly in the GAC and this is clearly a 2.0.0.0 assembly, so why won't it recognize it's a unique strong name?
Any suggestions??
Thanks for your help - this tool has saved me a lot of time!!!

«/\/\Ø|ö±ò\/»®© said...

Hi perplexed,
How are you trying to add mscorcfg.dll to the GAC?

I simply dropped it from the source folder onto %WINDIR%\Assembly, and it was added to the GAC properly.

NoLongerPerplexed said...

I appreciate your response. I've tried several times to post a comment, but it never shows...trying again or sorry if they all finally show up.
I was trying to add it the way you suggested but ended up using gacutil in the command window and that did it. Don't know why it wouldn't take it from the assemblies folder, but it's working now.
Thanks again for following up.

«/\/\Ø|ö±ò\/»®© said...

Hi perplexed/nolongerperplexed,

I too have had problems in past with shfusion.dll's "ability" to drag/drop into the GAC. Seems a bit flakey, but it's generally one of the easier ways to get something into the GAC - at least worth a shot... Good to hear you got it working!

Anonymous said...

BEWARE of the Anonymous post with the download from performancemedia.com.au.

I downloaded this tool and installed it on my Windows Server 2003. It installed OK but didn't work when I tried to launch it from the shortcut (can't remember the exact error). I then uninstalled it and it deleted every file in the Program Files folder that wasn't in use at the time. Yes I mean files in sub folders as well - about 2Gb of files!!! I suspected something was wrong when the uninstall took so long. Luckily for me I was able to recover everything from a backup, but it still cost me about 2 hours to get it all sorted.

«/\/\Ø|ö±ò\/»®© said...

Thanks for the warning, Anonymous.

Perhaps I'll take advantage of this opportunity to point out again the previous comment I made - use these items at your own risk. It's great that others take the time to put something helpful together, but they are likely offering the product as-is, and may not have the time or resources to test in as wide of an array of scenarios as they would like to.

Cavia porcellus emptor? ;-)

Dary said...

Thanks.

Victor Lindsey said...

It is involved in .NET 2.0 SDK. You need to set up the SDK to get it.Here is a individual weblink for the .NET 2.0 SDK (64 bit version) for use on 64-bit devices.