tags:

views:

602

answers:

4

I've been creating snapins with the new MMC 3.0 classes and C#. I can't seem to find any examples of how to get rid of the "Console Root" node when creating the *.msc files. I looked through the examples in the SDK, but I can't seem to find anything for this.

I have seen other snapins that do what I want, but I can't tell what version of MMC they are using.

+1  A: 

As far as I know, MMC always shows the Console Root. Even if you open it with no snap-in, you will still see the Console Root. Snap ins are only added under it, and several could be loaded at the same time and they would all be under the console root which is simply the root of the tree.

configurator
A: 

Nobody knows how to do this?

I've seen screenshots of this being done in a CodePlex project, but I haven't been able to contact the author. I posted here hoping that somebody would know the answer.

hectorsosajr
+3  A: 

If I've understood you correctly, this isn't specific to MMC3, but it did take me a while to realise. Right-click on the node, and click New Window from Here. Then switch back to the Console Root window, and close it (Ctrl+F4).

Inside the .msc, it's //View/BookMark/@NodeID, which needs to be "2" (etc.), instead of "1".

Mark
This is exactly what I wanted all along. Thanks!
hectorsosajr
A: 

I know this is an older post, so maybe a response is not necessary but what you're trying to do requires saving a customized MSC file. As one reply states, add your SnapIn, select Open new window from here, then save the MSC file. This is your console configured to show your SnapIn as the RootNode rather than the Console root. Under the File menu is an Options... dialog. From there you can change settings for that particular console file to provide end users a non-Author mode console, they won't be able to change the layout on you then. Note: this is only a setting for that specific console file (e.g. C:\temp\MyCustomConsole.msc), anyone could open a console and use the add/remove dialog to open the SnapIn in any other console they desire.

Andrew