Search code examples
c#.netmmcsnap-in

MMC custom snap-ins installation


I have written a snap-in in c#.

I tried installing it using installutil and it didn't work at first. I notice that on the msdn page they said to run mmcperf to install the management.dll into the GAC.

Doing this, I was able to install my snap in and run it. I have an xp machine.

My question is how am I to deploy my custom snap in on a customer machine ... What are the things I need to consider ? (the OS?, the .net framework, is mmc 3.0 installed, etc?)

Can I run mmcperf during the installation of my snap in? Is this a good approach?


Solution

  • You problem may be different, but I once ran into a similar issue on a 64-bit machine and found out the following. If your problem isn't related to 32/64-bit I can't say what the issue is, and I apologize for taking your time.

    You should be able to install the snap-in using InstallUtil. However, note that there are two separate versions on InstallUtil: One (the default) for x86 binaries, and one for x64 binaries.

    Even if you compile your C# code for Any CPU, using the standard InstallUtil will only register the MMC snap-in as a 32-bit snap-in. If you are running on a 64-bit OS, try starting MMC as a 32-bit process (MMC /32 IIRC) and see if your snap-in isn't available there.

    To register the snap-in as a 64-bit snap-in, you must use the 64-bit version of InstallUtil (normally found in C:\Windows\Microsoft.NET\Framework64\v2.0.50727).

    To register both versions of the snap-in, you must register it twice.