0

我有“组策略编辑器”管理单元(计算机/用户配置)的扩展。

如何在 gpmc 的“设置”选项卡中为我的扩展程序实现生成报告?

谢谢。

代码。

using System;
using System.Text;
using System.Configuration.Install;
using System.ComponentModel;
using System.Security.Permissions;
using System.Windows.Forms;
using Microsoft.ManagementConsole;
using Microsoft.ManagementConsole.Advanced;

[assembly: PermissionSetAttribute(SecurityAction.RequestMinimum, Unrestricted = true)]

namespace Microsoft.ManagementConsole.Samples
{
    [RunInstaller(true)]
    public class InstallUtilSupport : SnapInInstaller
    {}

    [SnapInSettings("0F3F3735-573D-9804-99E4-AB2A69BA5FD4", 
        DisplayName = "- Extension to Extensible SnapIn", 
        Description = "Sample showing how to extend a node.")]
    [ExtendsNodeType("8FC0B737-A0E1-11D1-A7D3-0000F87571E3")]
    public class ExtensionToSnapIn : NamespaceExtension
    {
        public ExtensionToSnapIn ()
        {}
        protected override void OnInitialize()
        {
            ScopeNode scopeNode = new ScopeNode();
            scopeNode.DisplayName = "My extension";
            PrimaryNode.Children.Add(scopeNode);
        }
    }
}
4

0 回答 0