コード例 #1
0
ファイル: RemoteHook.cs プロジェクト: tloeb/carteiro_win
        //private void CreateUpdateMsi()
        //{
        //    Project project =
        //     new Project("Foobar",

        //         new PathFileAction(
        //                     @"%WindowsFolder%\notepad.exe",
        //                     "readme.txt",
        //                     "INSTALLDIR",
        //                     Return.asyncNoWait,
        //                     When.After,
        //                     Step.InstallFinalize,
        //                     new Condition("(NOT Installed) AND (UILevel > 3)")) //execute this action during the installation but only if it is not silent mode (UILevel > 3)
        //     );

        //    project.GUID = new Guid("6f330b47-2577-43ad-9095-1861ba25889b");
        //    project.SourceBaseDir = Environment.CurrentDirectory;
        //    project.OutFileName = "setup";

        //    Compiler.WixLocation = ((string)Registry.GetValue(REG_PATH, "Path", null) + "CarteiroWin\\bin\\");
        //    Compiler.BuildMsi(project);
        //}

        //WSUS Group-Management
        private List <Dictionary <string, string> > GetComputerTargetGroups(IUpdateServer wsus)
        {
            List <Dictionary <string, string> > retList = new List <Dictionary <string, string> >();
            ComputerTargetGroupCollection       groups  = new ComputerTargetGroupCollection();

            groups = wsus.GetComputerTargetGroups();
            foreach (IComputerTargetGroup group in groups)
            {
                Dictionary <string, string> details = new Dictionary <string, string>();
                details.Add("Id", group.Id.ToString());
                details.Add("Name", group.Name);
                retList.Add(details);
            }
            return(retList);
        }