public CreateWindowsRegistryKeyOperation(WindowsRegistryRoot root, string key, IEnumerable <WindowsRegistryValue> values, IEnumerable <WindowsRegistrySubKey> keys) { _root = root; _key = key; _values = values; _keys = keys; }
public CreateWindowsRegistryKeyOperation(WindowsRegistryRoot root, string key, IEnumerable<WindowsRegistryValue> values, IEnumerable<WindowsRegistrySubKey> keys) { _root = root; _key = key; _values = values; _keys = keys; }
/// <summary> /// Deletes a Windows Registry key. /// </summary> /// <param name="reg"></param> /// <param name="root">The Windows Registry hive to use. See <see cref="WindowsRegistryRoot"/> for available options. Example: WindowsRegistryRoot.HKEY_LOCAL_MACHINE</param> /// <param name="key">Name of the key you want to delete. Example: SOFTWARE\ConDep</param> /// <returns></returns> public static IOfferWindowsRegistryOperations DeleteKey(this IOfferWindowsRegistryOperations reg, WindowsRegistryRoot root, string key) { var op = new DeleteWindowsRegistryKeyOperation(root, key); var regBuilder = reg as WindowsRegistryBuilder; Configure.Operation(regBuilder.RemoteConfigurationBuilder, op); return reg; }
public SetWindowsRegistryValueOperation(WindowsRegistryRoot root, string key, string valueName, string valueData, RegistryValueKind valueKind) { _root = root; _key = key; _valueName = valueName; _valueData = valueData; _valueKind = valueKind; }
/// <summary> /// Creates a Windows Registry key with default value and optional values and sub keys. /// </summary> /// <param name="reg"></param> /// <param name="root">The Windows Registry hive to use. See <see cref="WindowsRegistryRoot"/> for available options. Example: WindowsRegistryRoot.HKEY_LOCAL_MACHINE</param> /// <param name="key">Name of the key to create. Example: SOFTWARE\ConDep</param> /// <param name="defaultValue">The default value of the key</param> /// <param name="options">Additional options for setting Windows Registry values and sub keys.</param> /// <returns></returns> public static IOfferWindowsRegistryOperations CreateKey(this IOfferWindowsRegistryOperations reg, WindowsRegistryRoot root, string key, string defaultValue, Action<IOfferWindowsRegistryOptions> options = null) { var optBuilder = new WindowsRegistryOptionsBuilder(); if (options != null) { options(optBuilder); } var valuesBuilder = optBuilder.Values as WindowsRegistryValueBuilder; var keysBuilder = optBuilder.SubKeys as WindowsRegistrySubKeyBuilder; var op = new CreateWindowsRegistryKeyOperation(root, key, defaultValue, valuesBuilder.Values, keysBuilder.Keys); var regBuilder = reg as WindowsRegistryBuilder; Configure.Operation(regBuilder.RemoteConfigurationBuilder, op); return reg; }
/// <summary> /// Creates a Windows Registry key and optional values and sub keys. /// </summary> /// <param name="reg"></param> /// <param name="root">The Windows Registry hive to use. See <see cref="WindowsRegistryRoot"/> for available options. Example: WindowsRegistryRoot.HKEY_LOCAL_MACHINE</param> /// <param name="key">Name of the key to create. Example: SOFTWARE\ConDep</param> /// <param name="options">Additional options for setting Windows Registry values and sub keys.</param> /// <returns></returns> public static IOfferWindowsRegistryOperations CreateKey(this IOfferWindowsRegistryOperations reg, WindowsRegistryRoot root, string key, Action<IOfferWindowsRegistryOptions> options = null) { return CreateKey(reg, root, key, "", options); }
/// <summary> /// Creates or updates a Windows Registry value. /// </summary> /// <param name="reg"></param> /// <param name="root">The Windows Registry hive to use. See <see cref="WindowsRegistryRoot"/> for available options. Example: WindowsRegistryRoot.HKEY_LOCAL_MACHINE</param> /// <param name="key">Name of the key containing the value you want to create or update. Example: SOFTWARE\ConDep</param> /// <param name="valueName">Name of the registry value</param> /// <param name="valueData">The data value you want to set</param> /// <param name="valueKind">The data type to use when storing values in the registry</param> /// <returns></returns> public static IOfferWindowsRegistryOperations SetValue(this IOfferWindowsRegistryOperations reg, WindowsRegistryRoot root, string key, string valueName, string valueData, RegistryValueKind valueKind) { var op = new SetWindowsRegistryValueOperation(root, key, valueName, valueData, valueKind); var regBuilder = reg as WindowsRegistryBuilder; Configure.Operation(regBuilder.RemoteConfigurationBuilder, op); return reg; }
/// <summary> /// Deletes a value in Windows Registry. /// </summary> /// <param name="reg"></param> /// <param name="root">The Windows Registry hive to use. See <see cref="WindowsRegistryRoot"/> for available options. Example: WindowsRegistryRoot.HKEY_LOCAL_MACHINE</param> /// <param name="key">Name of the key where the value you want to delete exists. Example: SOFTWARE\ConDep</param> /// <param name="valueName">Name of the value you want to delete.</param> /// <returns></returns> public static IOfferWindowsRegistryOperations DeleteValue(this IOfferWindowsRegistryOperations reg, WindowsRegistryRoot root, string key, string valueName) { var op = new DeleteWindowsRegistryValueOperation(root, key, valueName); var regBuilder = reg as WindowsRegistryBuilder; OperationExecutor.Execute((RemoteBuilder)reg, op); return(reg); }
/// <summary> /// Deletes a value in Windows Registry. /// </summary> /// <param name="reg"></param> /// <param name="root">The Windows Registry hive to use. See <see cref="WindowsRegistryRoot"/> for available options. Example: WindowsRegistryRoot.HKEY_LOCAL_MACHINE</param> /// <param name="key">Name of the key where the value you want to delete exists. Example: SOFTWARE\ConDep</param> /// <param name="valueName">Name of the value you want to delete.</param> /// <returns></returns> public static IOfferWindowsRegistryOperations DeleteValue(this IOfferWindowsRegistryOperations reg, WindowsRegistryRoot root, string key, string valueName) { var op = new DeleteWindowsRegistryValueOperation(root, key, valueName); var regBuilder = reg as WindowsRegistryBuilder; Configure.Operation(regBuilder.RemoteConfigurationBuilder, op); return(reg); }
/// <summary> /// Creates a Windows Registry key and optional values and sub keys. /// </summary> /// <param name="reg"></param> /// <param name="root">The Windows Registry hive to use. See <see cref="WindowsRegistryRoot"/> for available options. Example: WindowsRegistryRoot.HKEY_LOCAL_MACHINE</param> /// <param name="key">Name of the key to create. Example: SOFTWARE\ConDep</param> /// <param name="options">Additional options for setting Windows Registry values and sub keys.</param> /// <returns></returns> public static IOfferWindowsRegistryOperations CreateKey(this IOfferWindowsRegistryOperations reg, WindowsRegistryRoot root, string key, Action <IOfferWindowsRegistryOptions> options = null) { return(CreateKey(reg, root, key, "", options)); }
/// <summary> /// Creates a Windows Registry key with default value and optional values and sub keys. /// </summary> /// <param name="reg"></param> /// <param name="root">The Windows Registry hive to use. See <see cref="WindowsRegistryRoot"/> for available options. Example: WindowsRegistryRoot.HKEY_LOCAL_MACHINE</param> /// <param name="key">Name of the key to create. Example: SOFTWARE\ConDep</param> /// <param name="defaultValue">The default value of the key</param> /// <param name="options">Additional options for setting Windows Registry values and sub keys.</param> /// <returns></returns> public static IOfferWindowsRegistryOperations CreateKey(this IOfferWindowsRegistryOperations reg, WindowsRegistryRoot root, string key, string defaultValue, Action <IOfferWindowsRegistryOptions> options = null) { var optBuilder = new WindowsRegistryOptionsBuilder(); if (options != null) { options(optBuilder); } var valuesBuilder = optBuilder.Values as WindowsRegistryValueBuilder; var keysBuilder = optBuilder.SubKeys as WindowsRegistrySubKeyBuilder; var op = new CreateWindowsRegistryKeyOperation(root, key, defaultValue, valuesBuilder.Values, keysBuilder.Keys); var regBuilder = reg as WindowsRegistryBuilder; OperationExecutor.Execute((RemoteBuilder)reg, op); return(reg); }
public DeleteWindowsRegistryKeyOperation(WindowsRegistryRoot root, string key) { _root = root; _key = key; }
public DeleteWindowsRegistryValueOperation(WindowsRegistryRoot root, string key, string valueName) { _root = root; _key = key; _valueName = valueName; }
/// <summary> /// Creates or updates a Windows Registry value. /// </summary> /// <param name="reg"></param> /// <param name="root">The Windows Registry hive to use. See <see cref="WindowsRegistryRoot"/> for available options. Example: WindowsRegistryRoot.HKEY_LOCAL_MACHINE</param> /// <param name="key">Name of the key containing the value you want to create or update. Example: SOFTWARE\ConDep</param> /// <param name="valueName">Name of the registry value</param> /// <param name="valueData">The data value you want to set</param> /// <param name="valueKind">The data type to use when storing values in the registry</param> /// <returns></returns> public static IOfferWindowsRegistryOperations SetValue(this IOfferWindowsRegistryOperations reg, WindowsRegistryRoot root, string key, string valueName, string valueData, RegistryValueKind valueKind) { var op = new SetWindowsRegistryValueOperation(root, key, valueName, valueData, valueKind); var regBuilder = reg as WindowsRegistryBuilder; OperationExecutor.Execute((RemoteBuilder)reg, op); return(reg); }
/// <summary> /// Creates or updates a Windows Registry value. /// </summary> /// <param name="reg"></param> /// <param name="root">The Windows Registry hive to use. See <see cref="WindowsRegistryRoot"/> for available options. Example: WindowsRegistryRoot.HKEY_LOCAL_MACHINE</param> /// <param name="key">Name of the key containing the value you want to create or update. Example: SOFTWARE\ConDep</param> /// <param name="valueName">Name of the registry value</param> /// <param name="valueData">The data value you want to set</param> /// <param name="valueKind">The data type to use when storing values in the registry</param> /// <returns></returns> public static IOfferWindowsRegistryOperations SetValue(this IOfferWindowsRegistryOperations reg, WindowsRegistryRoot root, string key, string valueName, string valueData, RegistryValueKind valueKind) { var op = new SetWindowsRegistryValueOperation(root, key, valueName, valueData, valueKind); var regBuilder = reg as WindowsRegistryBuilder; Configure.Operation(regBuilder.RemoteConfigurationBuilder, op); return(reg); }