Ejemplo n.º 1
0
        private void TestRegistryCopyAction(string hive)
        {
            RegistryCopyAction registryCopyAction = new RegistryCopyAction
                (
                    new ActionRegistryCopy()
                    {
                        SourceHive = hive,
				        SourceRoot = @"SOFTWARE\Workshare\Options\0.00",
                        TargetRoot = @"SOFTWARE\Workshare\Options\0.50",
                    }
                );
            
            registryCopyAction.Execute();
        }
Ejemplo n.º 2
0
        public void TestRegistryCopyActionExclude()
        {
            RegistryCopyAction registryCopyAction = new RegistryCopyAction
            (
                new ActionRegistryCopy()
                {
                    SourceHive = "HKEY_CURRENT_USER",
                    SourceRoot = @"SOFTWARE\Workshare\Options\0.00",
                    TargetRoot = @"SOFTWARE\Workshare\Options\0.50",
                    ExcludeKey = new ActionRegistryCopyExcludeKey[]
                        {
                            new ActionRegistryCopyExcludeKey(){ Name = "EnableProtectSimple" },
                            new ActionRegistryCopyExcludeKey(){ Name = "ShowOptionsOnExternalEmail" },
                            new ActionRegistryCopyExcludeKey(){ Name = "UseClientProfiles" }
                        }    
                }
            );

            registryCopyAction.Execute();
        }
Ejemplo n.º 3
0
		private void ExecuteRegistryCopyAction(Action action)
		{
			try
			{
				if (action == null ||
					action.RegistryCopy == null)
				{
					return;
				}

				foreach (ActionRegistryCopy actionItem in action.RegistryCopy)
				{
					if (actionItem == null)
					{
						return;
					}

					RegistryCopyAction registryCopy = new RegistryCopyAction(actionItem);
					registryCopy.Execute();
				}
			}
			catch (Exception ex)
			{
				Logger.LogError(ex);
			}
		}