Beispiel #1
0
		public void TestRenameRegistryKeyActionUser()
		{
			ActionRenameRegistryKey actionItem = new ActionRenameRegistryKey();
			actionItem.Path = @"${Software6432}\Workshare\Options\${Version}\Internal\Internal\DocumentProviders";
			actionItem.KeyName = "Interwoven 8";
			actionItem.NewKeyName = "Interwoven";

			RenameRegistryKeyAction action = new RenameRegistryKeyAction(actionItem, ContextEnum.User);
			action.Execute();

		}
Beispiel #2
0
		private void ExcecuteRenameRegistryKeyAction(Action action, ContextEnum context)
		{
			try
			{
				if (action == null ||
					action.RenameRegistryKey == null)
				{
					return;
				}

				foreach (ActionRenameRegistryKey actionItem in action.RenameRegistryKey)
				{
					if (actionItem == null)
					{
						return;
					}

					RenameRegistryKeyAction renameRegistryKey = new RenameRegistryKeyAction(actionItem, context);
					renameRegistryKey.Execute();
				}
			}
			catch (Exception ex)
			{
				Logger.LogError(ex);
			}
		}