Exemple #1
0
        public Policy()
        {
            PolicyFiles = new List <PolicyFile>();
            AppliedTo   = new List <AssignmentItem>();
            LinkedTo    = new List <LinkageItem>();
            WMIFilters  = new List <WMIItem>();

            SecEditFileData = new SecEditFile();

            IEAKFileData        = new SecEditFile();
            IEAKMachineFileData = new SecEditFile();


            PreferencesFiles        = new List <PolReaderXMLNode>();
            MachinePreferencesFiles = new List <PolReaderXMLNode>();

            //Avecto = new List<PolReaderXMLNode>();
            //MachineAvecto =new List<PolReaderXMLNode>();

            GUID = "";
            Name = "";
            Date = new DateTime();
        }
Exemple #2
0
        public void Run()
        {
            if (Location == null || Location.Length == 0)
            {
                throw new Exception("Run can only be called when the Location is Set");
            }

            PolicyFiles = new List <PolicyFile>();
            AppliedTo   = new List <AssignmentItem>();
            LinkedTo    = new List <LinkageItem>();
            WMIFilters  = new List <WMIItem>();

            SecEditFileData = new SecEditFile(Location + "\\Machine\\microsoft\\windows nt\\secedit\\GptTmpl.inf");

            IEAKFileData = new SecEditFile(Location + "\\User\\Microsoft\\IEAK\\install.ins");
            IEAKFileData.AddExtraFile(Location + "\\User\\Microsoft\\IEAK\\branding\\Zones\\seczones.inf");
            IEAKFileData.AddExtraFile(Location + "\\User\\Microsoft\\IEAK\\branding\\Zones\\seczrsop.inf");
            IEAKFileData.AddExtraFile(Location + "\\User\\Microsoft\\IEAK\\branding\\Ratings\\ratings.inf");
            IEAKFileData.AddExtraFile(Location + "\\User\\Microsoft\\IEAK\\branding\\Ratings\\ratrsop.inf");
            IEAKFileData.AddExtraFile(Location + "\\User\\Microsoft\\IEAK\\branding\\Authcode\\authcode.inf");
            IEAKFileData.AddExtraFile(Location + "\\User\\Microsoft\\IEAK\\branding\\Programs\\programs.inf");
            IEAKFileData.AddExtraFile(Location + "\\User\\Microsoft\\IEAK\\branding\\Adm\\inetcorp.inf");
            IEAKFileData.AddExtraFile(Location + "\\User\\Microsoft\\IEAK\\branding\\Adm\\inetset.inf");

            IEAKMachineFileData = new SecEditFile(Location + "\\Machine\\Microsoft\\IEAK\\install.ins");
            IEAKMachineFileData.AddExtraFile(Location + "\\User\\Microsoft\\IEAK\\branding\\Zones\\seczones.inf");
            IEAKMachineFileData.AddExtraFile(Location + "\\User\\Microsoft\\IEAK\\branding\\Zones\\seczrsop.inf");
            IEAKMachineFileData.AddExtraFile(Location + "\\User\\Microsoft\\IEAK\\branding\\Ratings\\ratings.inf");
            IEAKMachineFileData.AddExtraFile(Location + "\\User\\Microsoft\\IEAK\\branding\\Ratings\\ratrsop.inf");
            IEAKMachineFileData.AddExtraFile(Location + "\\User\\Microsoft\\IEAK\\branding\\Authcode\\authcode.inf");
            IEAKMachineFileData.AddExtraFile(Location + "\\User\\Microsoft\\IEAK\\branding\\Programs\\programs.inf");
            IEAKMachineFileData.AddExtraFile(Location + "\\User\\Microsoft\\IEAK\\branding\\Adm\\inetcorp.inf");
            IEAKMachineFileData.AddExtraFile(Location + "\\User\\Microsoft\\IEAK\\branding\\Adm\\inetset.inf");


            PreferencesFiles        = new List <PolReaderXMLNode>();
            MachinePreferencesFiles = new List <PolReaderXMLNode>();

            AddPrefItem(MachinePreferencesFiles, Location + "\\Machine\\Preferences\\Applications\\Applications.xml");
            AddPrefItem(MachinePreferencesFiles, Location + "\\Machine\\Preferences\\Data Sources\\DataSources.xml");
            AddPrefItem(MachinePreferencesFiles, Location + "\\Machine\\Preferences\\Devices\\Devices.xml");
            AddPrefItem(MachinePreferencesFiles, Location + "\\Machine\\Preferences\\Drives\\Drives.xml");
            AddPrefItem(MachinePreferencesFiles, Location + "\\Machine\\Preferences\\EnvironmentVariables\\EnvironmentVariables.xml");
            AddPrefItem(MachinePreferencesFiles, Location + "\\Machine\\Preferences\\Files\\Files.xml");
            AddPrefItem(MachinePreferencesFiles, Location + "\\Machine\\Preferences\\FolderOptions\\FolderOptions.xml");
            AddPrefItem(MachinePreferencesFiles, Location + "\\Machine\\Preferences\\Folders\\Folders.xml");
            AddPrefItem(MachinePreferencesFiles, Location + "\\Machine\\Preferences\\IniFiles\\IniFiles.xml");
            AddPrefItem(MachinePreferencesFiles, Location + "\\Machine\\Preferences\\InternetSettings\\InternetSettings.xml");
            AddPrefItem(MachinePreferencesFiles, Location + "\\Machine\\Preferences\\Groups\\Groups.xml");
            AddPrefItem(MachinePreferencesFiles, Location + "\\Machine\\Preferences\\NetworkOptions\\NetworkOptions.xml");
            AddPrefItem(MachinePreferencesFiles, Location + "\\Machine\\Preferences\\NetworkShares\\NetworkShares.xml");
            AddPrefItem(MachinePreferencesFiles, Location + "\\Machine\\Preferences\\PowerOptions\\PowerOptions.xml");
            AddPrefItem(MachinePreferencesFiles, Location + "\\Machine\\Preferences\\Printers\\Printers.xml");
            AddPrefItem(MachinePreferencesFiles, Location + "\\Machine\\Preferences\\RegionalOptions\\RegionalOptions.xml");
            AddPrefItem(MachinePreferencesFiles, Location + "\\Machine\\Preferences\\Registry\\Registry.xml");
            AddPrefItem(MachinePreferencesFiles, Location + "\\Machine\\Preferences\\ScheduledTasks\\ScheduledTasks.xml");
            AddPrefItem(MachinePreferencesFiles, Location + "\\Machine\\Preferences\\Services\\Services.xml");
            AddPrefItem(MachinePreferencesFiles, Location + "\\Machine\\Preferences\\Shortcuts\\Shortcuts.xml");
            AddPrefItem(MachinePreferencesFiles, Location + "\\Machine\\Preferences\\StartMenuTaskbar\\StartMenuTaskbar.xml");


            AddPrefItem(PreferencesFiles, Location + "\\User\\Preferences\\Applications\\Applications.xml");
            AddPrefItem(PreferencesFiles, Location + "\\User\\Preferences\\Data Sources\\DataSources.xml");
            AddPrefItem(PreferencesFiles, Location + "\\User\\Preferences\\Devices\\Devices.xml");
            AddPrefItem(PreferencesFiles, Location + "\\User\\Preferences\\Drives\\Drives.xml");
            AddPrefItem(PreferencesFiles, Location + "\\User\\Preferences\\EnvironmentVariables\\EnvironmentVariables.xml");
            AddPrefItem(PreferencesFiles, Location + "\\User\\Preferences\\Files\\Files.xml");
            AddPrefItem(PreferencesFiles, Location + "\\User\\Preferences\\FolderOptions\\FolderOptions.xml");
            AddPrefItem(PreferencesFiles, Location + "\\User\\Preferences\\Folders\\Folders.xml");
            AddPrefItem(PreferencesFiles, Location + "\\User\\Preferences\\IniFiles\\IniFiles.xml");
            AddPrefItem(PreferencesFiles, Location + "\\User\\Preferences\\InternetSettings\\InternetSettings.xml");
            AddPrefItem(PreferencesFiles, Location + "\\User\\Preferences\\Groups\\Groups.xml");
            AddPrefItem(PreferencesFiles, Location + "\\User\\Preferences\\NetworkOptions\\NetworkOptions.xml");
            AddPrefItem(PreferencesFiles, Location + "\\User\\Preferences\\NetworkShares\\NetworkShares.xml");
            AddPrefItem(PreferencesFiles, Location + "\\User\\Preferences\\PowerOptions\\PowerOptions.xml");
            AddPrefItem(PreferencesFiles, Location + "\\User\\Preferences\\Printers\\Printers.xml");
            AddPrefItem(PreferencesFiles, Location + "\\User\\Preferences\\RegionalOptions\\RegionalOptions.xml");
            AddPrefItem(PreferencesFiles, Location + "\\User\\Preferences\\Registry\\Registry.xml");
            AddPrefItem(PreferencesFiles, Location + "\\User\\Preferences\\ScheduledTasks\\ScheduledTasks.xml");
            AddPrefItem(PreferencesFiles, Location + "\\User\\Preferences\\Services\\Services.xml");
            AddPrefItem(PreferencesFiles, Location + "\\User\\Preferences\\Shortcuts\\Shortcuts.xml");
            AddPrefItem(PreferencesFiles, Location + "\\User\\Preferences\\StartMenuTaskbar\\StartMenuTaskbar.xml");

            //MachineAvecto = new List<PolReaderXMLNode>();
            //Avecto = new List<PolReaderXMLNode>();

            //AddPrefItem(MachineAvecto, Location + "\\Machine\\Avecto\\Privilege Guard\\PrivilegeGuardConfig.xml");
            //AddPrefItem(Avecto, Location + "\\User\\Avecto\\Privilege Guard\\PrivilegeGuardConfig.xml");


            GetPolicySettings(Location);
        }