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(); }
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(); }
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); } }