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