public static void DisableMinimization()
        {
            Exception ex = null;

            try
            {
                IRegistryWriter instance = RegistryWriter.Instance;
                instance.SetValue(Registry.LocalMachine, "SOFTWARE\\Microsoft\\ExchangeServer\\v15\\Replay\\Parameters", "DisableADObjectMinimize", 1, RegistryValueKind.DWord);
            }
            catch (IOException ex2)
            {
                ex = ex2;
            }
            catch (UnauthorizedAccessException ex3)
            {
                ex = ex3;
            }
            catch (SecurityException ex4)
            {
                ex = ex4;
            }
            if (ex != null)
            {
                ADObjectWrapperBase.Tracer.TraceError <Exception>(0L, "DisableMinimization caught {0}", ex);
            }
        }
        public static Exception PublishDagNetConfig(string persistString)
        {
            Exception ex = RegistryUtil.RunRegistryFunction(delegate()
            {
                IRegistryWriter registryWriter = Dependencies.RegistryWriter;
                registryWriter.CreateSubKey(Registry.LocalMachine, DagNetEnvironment.RegistryRootKeyName);
                registryWriter.SetValue(Registry.LocalMachine, DagNetEnvironment.RegistryRootKeyName, "DagNetConfig", persistString);
            });

            if (ex != null)
            {
                DagNetEnvironment.Tracer.TraceError(0L, "PublishDagNetConfig fails: {0}", new object[]
                {
                    ex
                });
            }
            return(ex);
        }
Beispiel #3
0
        public static Exception WriteCompressionConfigString(string xmlString)
        {
            Exception result = null;

            try
            {
                IRegistryWriter instance = RegistryWriter.Instance;
                instance.SetValue(Registry.LocalMachine, "SOFTWARE\\Microsoft\\ExchangeServer\\v15\\Replay\\Parameters", "CompressionConfig", xmlString, RegistryValueKind.String);
            }
            catch (IOException ex)
            {
                result = ex;
            }
            catch (UnauthorizedAccessException ex2)
            {
                result = ex2;
            }
            catch (SecurityException ex3)
            {
                result = ex3;
            }
            return(result);
        }
Beispiel #4
0
        public static Exception WriteCompressionConfigString(string xmlString)
        {
            Exception result = null;

            try
            {
                IRegistryWriter instance = RegistryWriter.Instance;
                instance.SetValue(Registry.LocalMachine, Parameters.CurrentValues.RegistryRootKeyName, "CompressionConfig", xmlString, RegistryValueKind.String);
            }
            catch (IOException ex)
            {
                result = ex;
            }
            catch (UnauthorizedAccessException ex2)
            {
                result = ex2;
            }
            catch (SecurityException ex3)
            {
                result = ex3;
            }
            return(result);
        }