简体   繁体   English

如何摆脱MMC 3.0管理单元中的“控制台根”节点?

[英]How to get rid of the “Console Root” node in a MMC 3.0 snapin?

I've been creating snapins with the new MMC 3.0 classes and C#. 我一直在使用新的MMC 3.0类和C#创建管理单元。 I can't seem to find any examples of how to get rid of the "Console Root" node when creating the *.msc files. 我似乎找不到任何创建* .msc文件时如何摆脱“控制台根”节点的示例。 I looked through the examples in the SDK, but I can't seem to find anything for this. 我浏览了SDK中的示例,但似乎找不到任何东西。

I have seen other snapins that do what I want, but I can't tell what version of MMC they are using. 我看过其他管理单元可以执行我想要的操作,但是我无法确定它们使用的是哪个MMC版本。

If I've understood you correctly, this isn't specific to MMC3, but it did take me a while to realise. 如果我对您的理解正确,那么这并不是MMC3特有的,但是确实花了我一段时间。 Right-click on the node, and click New Window from Here . 右键单击该节点,然后单击New Window from Here Then switch back to the Console Root window, and close it (Ctrl+F4). 然后切换回“控制台根目录”窗口,然后将其关闭(Ctrl + F4)。

Inside the .msc, it's //View/BookMark/@NodeID, which needs to be "2" (etc.), instead of "1". 在.msc内,它是// View / BookMark / @ NodeID,它必须为“ 2”(等),而不是“ 1”。

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. 我知道这是一篇较旧的文章,因此也许不需要回复,但是您要执行的操作需要保存自定义的MSC文件。 As one reply states, add your SnapIn, select Open new window from here, then save the MSC file. 作为一种答复,请添加您的管理单元,从此处选择“打开新窗口”,然后保存MSC文件。 This is your console configured to show your SnapIn as the RootNode rather than the Console root. 这是配置为将SnapIn显示为RootNode而不是控制台根的控制台。 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 (eg 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. 注意:这仅是该特定控制台文件的设置(例如C:\\ temp \\ MyCustomConsole.msc),任何人都可以打开控制台,并使用添加/删除对话框在所需的任何其他控制台中打开管理单元。

As far as I know, MMC always shows the Console Root. 据我所知,MMC始终显示控制台根目录。 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. 仅在其下添加管理单元,并且可以同时加载多个管理单元,它们都将在控制台根下,而控制台根只是树的根。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM