7 instantiations of RegistryKey
Microsoft.Win32.Registry (7)
Microsoft\Win32\RegistryKey.cs (7)
237RegistryKey key = new RegistryKey(result, (permissionCheck != RegistryKeyPermissionCheck.ReadSubTree), false, _remoteKey, false, _regView); 431RegistryKey key = new RegistryKey(srh, true, true, false, isPerf, view); 462RegistryKey key = new RegistryKey(foreignHKey, true, false, true, ((IntPtr)hKey) == HKEY_PERFORMANCE_DATA, view); 509RegistryKey key = new RegistryKey(result, writable, false, _remoteKey, false, _regView); 553RegistryKey key = new RegistryKey(result, (permissionCheck == RegistryKeyPermissionCheck.ReadWriteSubTree), false, _remoteKey, false, _regView); 580RegistryKey key = new RegistryKey(result, writable, false, _remoteKey, false, _regView); 753return new RegistryKey(handle, writable: true, view: view);
319 references to RegistryKey
aspire (6)
Telemetry\WindowsMachineInformationProvider.cs (6)
60using var registry = RegistryKey.OpenBaseKey(Hive, RegistryView.Registry64); 61using var key = registry.OpenSubKey(registryRoot, writable: false); 84using var keyRoot = RegistryKey.OpenBaseKey(Hive, RegistryView.Registry64); 85using var key = keyRoot.OpenSubKey(keyPath, writable: true)
dotnet (6)
Telemetry\DevDeviceIDGetter.cs (5)
44using (var key = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Registry64).OpenSubKey(@"SOFTWARE\Microsoft\DeveloperTools")) 86using (RegistryKey baseKey = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Registry64)) 88using (var key = baseKey.CreateSubKey(@"SOFTWARE\Microsoft\DeveloperTools"))
Telemetry\DockerContainerDetectorForTelemetry.cs (1)
19using (RegistryKey subkey
Microsoft.AspNetCore.DataProtection (32)
_generated\0\LoggerMessage.g.cs (9)
617private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Win32.RegistryKey, string, global::System.Exception?> __ReadingDataFromRegistryKeyValueCallback = 618global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Win32.RegistryKey, string>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(40, "ReadingDataFromRegistryKeyValue"), "Reading data from registry key '{RegistryKeyName}', value '{Value}'.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 625public static partial void ReadingDataFromRegistryKeyValue(this global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Win32.RegistryKey registryKeyName, string value) 1193private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Win32.RegistryKey, string, global::System.Exception?> __RemovingDataFromRegistryKeyValueCallback = 1194global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Win32.RegistryKey, string>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(76, "RemovingDataFromRegistryKeyValue"), "Deleting registry key '{RegistryKeyName}', value '{Value}'.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 1201public static partial void RemovingDataFromRegistryKeyValue(this global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Win32.RegistryKey registryKeyName, string value) 1209private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Win32.RegistryKey, string, global::System.Exception?> __FailedToRemoveDataFromRegistryKeyValueCallback = 1210global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Win32.RegistryKey, string>(global::Microsoft.Extensions.Logging.LogLevel.Error, new global::Microsoft.Extensions.Logging.EventId(77, "FailedToRemoveDataFromRegistryKeyValue"), "Failed to delete registry key '{RegistryKeyName}', value '{ValueName}'. Not attempting further deletions.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 1217public static partial void FailedToRemoveDataFromRegistryKeyValue(this global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Win32.RegistryKey registryKeyName, string valueName, global::System.Exception exception)
DataProtectionBuilderExtensions.cs (1)
192public static IDataProtectionBuilder PersistKeysToRegistry(this IDataProtectionBuilder builder, RegistryKey registryKey)
KeyManagement\XmlKeyManager.cs (1)
690RegistryKey? regKeyStorageKey = null;
LoggingExtensions.cs (3)
158public static partial void ReadingDataFromRegistryKeyValue(this ILogger logger, RegistryKey registryKeyName, string value); 266public static partial void RemovingDataFromRegistryKeyValue(this ILogger logger, RegistryKey registryKeyName, string value); 269public static partial void FailedToRemoveDataFromRegistryKeyValue(this ILogger logger, RegistryKey registryKeyName, string valueName, Exception exception);
RegistryPolicyResolver.cs (8)
25private readonly Func<RegistryKey?> _getPolicyRegKey; 34internal RegistryPolicyResolver(RegistryKey policyRegKey, IActivator activator) 40private static List<string> ReadKeyEscrowSinks(RegistryKey key) 65using (var registryKey = _getPolicyRegKey()) 71private RegistryPolicy? ResolvePolicyCore(RegistryKey? policyRegKey) 114private static CngCbcAuthenticatedEncryptorConfiguration GetCngCbcAuthenticatedEncryptorConfiguration(RegistryKey key) 150private static CngGcmAuthenticatedEncryptorConfiguration GetCngGcmAuthenticatedEncryptorConfiguration(RegistryKey key) 174private static ManagedAuthenticatedEncryptorConfiguration GetManagedAuthenticatedEncryptorConfiguration(RegistryKey key)
Repositories\RegistryXmlRepository.cs (10)
23private static readonly Lazy<RegistryKey?> _defaultRegistryKeyLazy = new Lazy<RegistryKey?>(GetDefaultHklmStorageKey); 32public RegistryXmlRepository(RegistryKey registryKey, ILoggerFactory loggerFactory) 48public static RegistryKey? DefaultRegistryKey => _defaultRegistryKeyLazy.Value; 53public RegistryKey RegistryKey { get; } 80private static RegistryKey? GetDefaultHklmStorageKey() 86using (var hklmBaseKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, registryView)) 96var aspnetBaseKey = hklmBaseKey.OpenSubKey(aspnetAutoGenKeysBaseKeyName, writable: true); 127private XElement? ReadElementFromRegKey(RegistryKey regKey, string valueName)
Microsoft.Build (10)
Evaluation\IntrinsicFunctions.cs (10)
304using (RegistryKey key = GetBaseKeyFromKeyName(keyName, view, out string subKeyName)) 308using (RegistryKey subKey = key.OpenSubKey(subKeyName, false)) 770private static RegistryKey GetBaseKeyFromKeyName(string keyName, RegistryView view, out string subKeyName) 788RegistryKey basekey = null; 793basekey = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, view); 796basekey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, view); 799basekey = RegistryKey.OpenBaseKey(RegistryHive.ClassesRoot, view); 802basekey = RegistryKey.OpenBaseKey(RegistryHive.Users, view); 805basekey = RegistryKey.OpenBaseKey(RegistryHive.PerformanceData, view); 808basekey = RegistryKey.OpenBaseKey(RegistryHive.CurrentConfig, view);
Microsoft.Build.Framework (3)
EncodingUtilities.cs (1)
307using RegistryKey? windowsVersionRegistry = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion");
NativeMethods.cs (2)
345using (RegistryKey fileSystemKey = Registry.LocalMachine.OpenSubKey(WINDOWS_FILE_SYSTEM_REGISTRY_KEY)) 398using (RegistryKey policyKey = Registry.LocalMachine.OpenSubKey(WINDOWS_SAC_REGISTRY_KEY))
Microsoft.Build.Tasks.Core (33)
BootstrapperUtil\Util.cs (4)
173RegistryKey bootstrapperBaseRegKey = Registry.LocalMachine.OpenSubKey(BOOTSTRAPPER_REGISTRY_PATH_BASE); 181RegistryKey additionalPackagePathsRegKey = bootstrapperBaseRegKey.OpenSubKey(BOOTSTRAPPER_REGISTRY_ADDITIONAL_PACKAGE_PATHS_KEYNAME); 215private static string ReadRegistryString(RegistryKey key, string path, string registryValue) 217RegistryKey subKey = key.OpenSubKey(path, false);
ManifestUtil\ComImporter.cs (12)
146private void CheckForUnknownSubKeys(RegistryKey key) 151private void CheckForUnknownSubKeys(RegistryKey key, string[] knownNames) 165private void CheckForUnknownValues(RegistryKey key) 170private void CheckForUnknownValues(RegistryKey key, string[] knownNames) 191using (RegistryKey userKey = Registry.CurrentUser.OpenSubKey("SOFTWARE\\CLASSES\\CLSID")) 199using (RegistryKey machineKey = Registry.ClassesRoot.OpenSubKey("CLSID")) 210using (RegistryKey classesRootKey = RegistryKey.OpenBaseKey(RegistryHive.ClassesRoot, RegistryView.Registry32)) 212using (RegistryKey clsidKey = classesRootKey.OpenSubKey("CLSID")) 225private bool GetRegisteredClassInfo(RegistryKey rootKey, Guid clsid, ref ClassInfo info) 233RegistryKey classKey = rootKey.OpenSubKey(sclsid); 247RegistryKey subKey = classKey.OpenSubKey(subKeyName);
ManifestUtil\SecurityUtil.cs (3)
924using (RegistryKey localMachineKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32)) 926using (RegistryKey versionIndependentToolKey = localMachineKey.OpenSubKey(versionIndependentToolKeyName, writable: false))
ManifestUtil\Util.cs (1)
279RegistryKey key = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", false);
src\msbuild\src\Shared\AssemblyFolders\AssemblyFoldersEx.cs (3)
153using (RegistryKey baseKey = openBaseKey(hive, view)) 233using (RegistryKey keyPlatform = baseKey.OpenSubKey(directoryKey.RegistryKey, false)) 291private bool IsVersionInsideRange(Version v, RegistryKey keyPlatform)
src\msbuild\src\Shared\RegistryDelegates.cs (3)
12internal delegate RegistryKey OpenBaseKey(RegistryHive hive, RegistryView view); 21internal delegate IEnumerable<string> GetRegistrySubKeyNames(RegistryKey baseKey, string subKey); 30internal delegate string GetRegistrySubKeyDefaultValue(RegistryKey baseKey, string subKey);
src\msbuild\src\Shared\RegistryHelper.cs (7)
22internal static IEnumerable<string>? GetSubKeyNames(RegistryKey baseKey, string subkey) 26using (RegistryKey? subKey = baseKey.OpenSubKey(subkey)) 43internal static string? GetDefaultValue(RegistryKey baseKey, string subkey) 47using (RegistryKey? key = baseKey.OpenSubKey(subkey)) 65internal static RegistryKey OpenBaseKey(RegistryHive hive, RegistryView view) 67RegistryKey key = RegistryKey.OpenBaseKey(hive, view);
Microsoft.Build.Utilities.Core (15)
src\msbuild\src\Shared\AssemblyFolders\AssemblyFoldersEx.cs (3)
153using (RegistryKey baseKey = openBaseKey(hive, view)) 233using (RegistryKey keyPlatform = baseKey.OpenSubKey(directoryKey.RegistryKey, false)) 291private bool IsVersionInsideRange(Version v, RegistryKey keyPlatform)
src\msbuild\src\Shared\RegistryDelegates.cs (3)
12internal delegate RegistryKey OpenBaseKey(RegistryHive hive, RegistryView view); 21internal delegate IEnumerable<string> GetRegistrySubKeyNames(RegistryKey baseKey, string subKey); 30internal delegate string GetRegistrySubKeyDefaultValue(RegistryKey baseKey, string subKey);
src\msbuild\src\Shared\RegistryHelper.cs (7)
22internal static IEnumerable<string>? GetSubKeyNames(RegistryKey baseKey, string subkey) 26using (RegistryKey? subKey = baseKey.OpenSubKey(subkey)) 43internal static string? GetDefaultValue(RegistryKey baseKey, string subkey) 47using (RegistryKey? key = baseKey.OpenSubKey(subkey)) 65internal static RegistryKey OpenBaseKey(RegistryHive hive, RegistryView view) 67RegistryKey key = RegistryKey.OpenBaseKey(hive, view);
ToolLocationHelper.cs (2)
2682using (RegistryKey baseKey = openBaseKey(registryHive, registryView)) 2734using (RegistryKey versionKey = baseKey.OpenSubKey(platformSDKsRegistryKey))
Microsoft.DotNet.Cli.Utils (10)
DependencyProvider.cs (9)
51public readonly RegistryKey BaseKey; 127using RegistryKey dependentsKey = BaseKey.CreateSubKey(Path.Combine(DependentsKeyPath, dependent), writable: true); 149using RegistryKey? dependentsKey = BaseKey.OpenSubKey(DependentsKeyPath, writable: true); 154using RegistryKey? providerKey = BaseKey.OpenSubKey(DependenciesKeyRelativePath, writable: true); 165using RegistryKey? dependentsKey = BaseKey.OpenSubKey(DependentsKeyPath); 177using RegistryKey? providerKey = BaseKey.OpenSubKey(ProviderKeyPath); 185var baseKey = allUsers ? Registry.LocalMachine : Registry.CurrentUser; 186using RegistryKey? dependenciesKey = baseKey.OpenSubKey(DependenciesKeyRelativePath); 190using RegistryKey? providerKey = dependenciesKey?.OpenSubKey(providerKeyName);
UILanguageOverride.cs (1)
134using RegistryKey? windowsVersionRegistry = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion");
Microsoft.Extensions.AI.Evaluation.Console (6)
Telemetry\DeviceIdHelper.cs (6)
72using RegistryKey baseKey = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Registry64); 73using RegistryKey? key = baseKey.OpenSubKey(RegistryKeyPath); 103using RegistryKey baseKey = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Registry64); 104using RegistryKey key = baseKey.CreateSubKey(RegistryKeyPath);
Microsoft.TestPlatform.CoreUtilities (5)
Helpers\WindowsRegistryHelper.cs (5)
14var keyRegistry = RegistryKey.OpenBaseKey(hKey, view); 21private readonly RegistryKey _registryKey; 23public RegistryKeyWrapper(RegistryKey registryKey) 35var keyRegistry = _registryKey.OpenSubKey(name);
Microsoft.VisualBasic.Core (5)
Microsoft\VisualBasic\Interaction.vb (5)
322Dim UserKey As RegistryKey 323Dim AppSectionKey As RegistryKey = Nothing 353Dim rk As RegistryKey 412Dim rk As RegistryKey = Nothing 452Dim rk As RegistryKey
Microsoft.VisualBasic.Forms (6)
Microsoft\VisualBasic\MyServices\RegistryProxy.vb (6)
21Public ReadOnly Property ClassesRoot() As RegistryKey 27Public ReadOnly Property CurrentConfig() As RegistryKey 33Public ReadOnly Property CurrentUser() As RegistryKey 39Public ReadOnly Property LocalMachine() As RegistryKey 45Public ReadOnly Property PerformanceData() As RegistryKey 51Public ReadOnly Property Users() As RegistryKey
Microsoft.Win32.Registry (47)
Microsoft\Win32\Registry.cs (18)
13public static readonly RegistryKey CurrentUser = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Default); 16public static readonly RegistryKey LocalMachine = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Default); 19public static readonly RegistryKey ClassesRoot = RegistryKey.OpenBaseKey(RegistryHive.ClassesRoot, RegistryView.Default); 22public static readonly RegistryKey Users = RegistryKey.OpenBaseKey(RegistryHive.Users, RegistryView.Default); 25public static readonly RegistryKey PerformanceData = RegistryKey.OpenBaseKey(RegistryHive.PerformanceData, RegistryView.Default); 28public static readonly RegistryKey CurrentConfig = RegistryKey.OpenBaseKey(RegistryHive.CurrentConfig, RegistryView.Default); 36private static RegistryKey GetBaseKeyFromKeyName(string keyName, out string subKeyName) 44RegistryKey? baseKey = null; 69RegistryKey basekey = GetBaseKeyFromKeyName(keyName, out string subKeyName); 71using (RegistryKey? key = basekey.OpenSubKey(subKeyName)) 84RegistryKey basekey = GetBaseKeyFromKeyName(keyName, out string subKeyName); 86using (RegistryKey? key = basekey.CreateSubKey(subKeyName))
Microsoft\Win32\RegistryKey.cs (29)
168public RegistryKey CreateSubKey(string subkey) 173public RegistryKey CreateSubKey(string subkey, bool writable) 178public RegistryKey CreateSubKey(string subkey, bool writable, RegistryOptions options) 183public RegistryKey CreateSubKey(string subkey, RegistryKeyPermissionCheck permissionCheck) 188public RegistryKey CreateSubKey(string subkey, RegistryKeyPermissionCheck permissionCheck, RegistrySecurity? registrySecurity) 193public RegistryKey CreateSubKey(string subkey, RegistryKeyPermissionCheck permissionCheck, RegistryOptions registryOptions) 198public unsafe RegistryKey CreateSubKey(string subkey, RegistryKeyPermissionCheck permissionCheck, RegistryOptions registryOptions, RegistrySecurity? registrySecurity) 209RegistryKey? key = InternalOpenSubKeyWithoutSecurityChecks(subkey, (permissionCheck != RegistryKeyPermissionCheck.ReadSubTree)); 237RegistryKey key = new RegistryKey(result, (permissionCheck != RegistryKeyPermissionCheck.ReadSubTree), false, _remoteKey, false, _regView); 283RegistryKey? key = InternalOpenSubKeyWithoutSecurityChecks(subkey, false); 345RegistryKey? key = InternalOpenSubKeyWithoutSecurityChecks(subkey, true); 411/// Retrieves a new <see cref="RegistryKey"/> that represents the requested <see cref="RegistryHive"/> . 415/// <returns>The <see cref="RegistryKey"/> requested.</returns> 416public static RegistryKey OpenBaseKey(RegistryHive hKey, RegistryView view) 431RegistryKey key = new RegistryKey(srh, true, true, false, isPerf, view); 441public static RegistryKey OpenRemoteBaseKey(RegistryHive hKey, string machineName) 446public static RegistryKey OpenRemoteBaseKey(RegistryHive hKey, string machineName, RegistryView view) 462RegistryKey key = new RegistryKey(foreignHKey, true, false, true, ((IntPtr)hKey) == HKEY_PERFORMANCE_DATA, view); 488public RegistryKey? OpenSubKey(string name) 500public RegistryKey? OpenSubKey(string name, bool writable) 509RegistryKey key = new RegistryKey(result, writable, false, _remoteKey, false, _regView); 528public RegistryKey? OpenSubKey(string name, RegistryKeyPermissionCheck permissionCheck) 535public RegistryKey? OpenSubKey(string name, RegistryRights rights) 540public RegistryKey? OpenSubKey(string name, RegistryKeyPermissionCheck permissionCheck, RegistryRights rights) 553RegistryKey key = new RegistryKey(result, (permissionCheck == RegistryKeyPermissionCheck.ReadWriteSubTree), false, _remoteKey, false, _regView); 572internal RegistryKey? InternalOpenSubKeyWithoutSecurityChecks(string name, bool writable) 580RegistryKey key = new RegistryKey(result, writable, false, _remoteKey, false, _regView); 742public static RegistryKey FromHandle(SafeRegistryHandle handle) 747public static RegistryKey FromHandle(SafeRegistryHandle handle, RegistryView view)
Microsoft.Win32.Registry.AccessControl (3)
Microsoft\Win32\RegistryAclExtensions.cs (3)
11public static RegistrySecurity GetAccessControl(this RegistryKey key) 18public static RegistrySecurity GetAccessControl(this RegistryKey key, AccessControlSections includeSections) 25public static void SetAccessControl(this RegistryKey key, RegistrySecurity registrySecurity)
mscorlib (1)
src\runtime\src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
14[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.Win32.RegistryKey))]
PresentationCore (7)
MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (2)
297RegistryKey regkey = Registry.LocalMachine; 298RegistryKey recognizerKey = regkey.OpenSubKey(GestureRecognizerPath);
System\Windows\Diagnostics\VisualDiagnostics.cs (1)
343RegistryKey key = Registry.LocalMachine.OpenSubKey(c_devmodeRegKey);
System\Windows\Input\Stylus\Common\StylusLogic.cs (2)
328RegistryKey stylusKey = null; // This object has finalizer to close the key. 329RegistryKey touchKey = null; // This object has finalizer to close the key.
System\Windows\Input\Stylus\Wisp\WispTabletDeviceCollection.cs (1)
79RegistryKey key = null; // This object has finalizer to close the key.
System\Windows\Input\TextCompositionManager.cs (1)
903RegistryKey key = Registry.CurrentUser.OpenSubKey("Control Panel\\Input Method");
PresentationFramework (21)
MS\Internal\IO\Packaging\PackageFilter.cs (7)
513RegistryKey iFilterIidKey = 529private static RegistryKey FindSubkey(RegistryKey containingKey, string[] keyPath) 531RegistryKey currentKey = containingKey; 553RegistryKey mimeContentType = FindSubkey(Registry.ClassesRoot, _mimeContentTypeKey); 554RegistryKey mimeTypeKey = (mimeContentType?.OpenSubKey(contentType.ToString())); 579RegistryKey persistentHandlerKey =
System\Windows\Application.cs (1)
2294using (RegistryKey soundKey = Registry.CurrentUser.OpenSubKey(regPath))
System\Windows\Documents\RtfToXamlReader.cs (1)
3708RegistryKey rk = Registry.LocalMachine.OpenSubKey("Software\\Microsoft\\Windows NT\\CurrentVersion\\FontSubstitutes");
System\Windows\Documents\Serialization\SerializerDescriptor.cs (4)
33private static string GetNonEmptyRegistryString(RegistryKey key, string value) 129internal void WriteToRegistryKey(RegistryKey key) 151internal static SerializerDescriptor CreateFromRegistry(RegistryKey plugIns, string keyName) 158RegistryKey key = plugIns.OpenSubKey(keyName);
System\Windows\Documents\Serialization\SerializerProvider.cs (5)
43RegistryKey plugIns = _rootKey.CreateSubKey(_registryPath); 74RegistryKey plugIns = _rootKey.CreateSubKey(_registryPath); 82RegistryKey newPlugIn = plugIns.CreateSubKey(serializerKey); 100RegistryKey plugIns = _rootKey.CreateSubKey(_registryPath); 221private static readonly RegistryKey _rootKey = Registry.LocalMachine;
System\Windows\Markup\RestrictiveXamlXmlReader.cs (3)
40using (RegistryKey hklm = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64)) 44using (RegistryKey xpsDangerKey = hklm.OpenSubKey(AllowedTypesForRestrictiveXamlContexts, false))
PresentationUI (3)
MS\Internal\Documents\RightsManagementProvider.cs (2)
393using (RegistryKey defaultRMKey = Registry.CurrentUser.OpenSubKey( 461using (RegistryKey defaultRMKey = Registry.CurrentUser.CreateSubKey(
MS\Internal\Documents\RMPublishingDialog.cs (1)
324using (RegistryKey defaultRMKey = Registry.CurrentUser.OpenSubKey(
System.Data.OleDb (2)
System\Data\Common\AdapterUtil.cs (2)
1098using (RegistryKey? key = Registry.ClassesRoot.OpenSubKey(subkey, false)) 1116using (RegistryKey? key = Registry.LocalMachine.OpenSubKey(subkey, false))
System.Diagnostics.EventLog (46)
src\runtime\src\libraries\Common\src\System\Diagnostics\NetFrameworkUtils.cs (7)
123RegistryKey? baseKey = null; 124RegistryKey? complusReg = null; 131baseKey = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, machineName); 147RegistryKey? policyKey = complusReg.OpenSubKey("policy"); 157RegistryKey? bestKey = policyKey.OpenSubKey(versionPrefix); 197RegistryKey? k = policyKey.OpenSubKey(majorVersion); 249private static int GetLargestBuildNumberFromKey(RegistryKey rootKey)
System\Diagnostics\EventLog.cs (24)
280RegistryKey? baseKey = null; 281RegistryKey? eventKey = null; 282RegistryKey? logKey = null; 283RegistryKey? sourceLogKey = null; 284RegistryKey? sourceKey = null; 290baseKey = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, machineName); 372RegistryKey? eventlogkey = null; 386using (RegistryKey? logKey = eventlogkey.OpenSubKey(logName)) 448RegistryKey? key = null; 508RegistryKey? eventkey = null; 509RegistryKey? logKey = null; 527private static RegistryKey? FindSourceRegistration(string source, string machineName, bool readOnly) 532private static RegistryKey? FindSourceRegistration(string? source, string machineName, bool readOnly, bool wantToCreate) 536RegistryKey? eventkey = null; 555RegistryKey? sourceKey = null; 558RegistryKey? logKey = eventkey.OpenSubKey(logNames[i], /*writable*/!readOnly); 631RegistryKey? eventkey = null; 671internal static RegistryKey? GetEventLogRegKey(string machine, bool writable) 673RegistryKey? lmkey = null; 683lmkey = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, machine); 735using (RegistryKey? keyFound = FindSourceRegistration(source, machineName, true, wantToCreate)) 748using (RegistryKey? key = FindSourceRegistration(source, machineName, true)) 772private static void SetSpecialLogRegValues(RegistryKey logKey) 784private static void SetSpecialSourceRegValues(RegistryKey sourceLogKey, EventSourceCreationData sourceData)
System\Diagnostics\EventLogEntry.cs (4)
373private static RegistryKey? GetSourceRegKey(string logName, string source, string machineName) 375RegistryKey? eventKey = null; 376RegistryKey? logKey = null; 395RegistryKey? regKey = null;
System\Diagnostics\EventLogInternal.cs (11)
182RegistryKey? logkey = null; 269using (RegistryKey logkey = GetLogRegKey(currentMachineName, true)) 941internal static RegistryKey? GetEventLogRegKey(string machine, bool writable) 943RegistryKey? lmkey = null; 953lmkey = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, machine); 966private RegistryKey GetLogRegKey(string currentMachineName, bool writable) 972RegistryKey? eventkey = null; 973RegistryKey? logkey = null; 995RegistryKey? logkey = null; 1048using (RegistryKey logkey = GetLogRegKey(currentMachineName, true)) 1117using (RegistryKey logkey = GetLogRegKey(currentMachineName, true))
System.Diagnostics.PerformanceCounter (19)
src\runtime\src\libraries\Common\src\System\Diagnostics\NetFrameworkUtils.cs (7)
123RegistryKey? baseKey = null; 124RegistryKey? complusReg = null; 131baseKey = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, machineName); 147RegistryKey? policyKey = complusReg.OpenSubKey("policy"); 157RegistryKey? bestKey = policyKey.OpenSubKey(versionPrefix); 197RegistryKey? k = policyKey.OpenSubKey(majorVersion); 249private static int GetLargestBuildNumberFromKey(RegistryKey rootKey)
System\Diagnostics\PerformanceCounterLib.cs (11)
513RegistryKey serviceParentKey = null; 514RegistryKey serviceKey = null; 515RegistryKey linkageKey = null; 598RegistryKey serviceKey = null; 605using (RegistryKey categoryKey = serviceKey.OpenSubKey(categoryName, true)) 655RegistryKey key = null; 656RegistryKey baseKey = null; 680baseKey = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, "\\\\" + _machineName); 970using RegistryKey libraryParentKey = Registry.LocalMachine.OpenSubKey(PerflibPath); 1024RegistryKey libraryKey = string.Equals(_machineName, ComputerName, StringComparison.OrdinalIgnoreCase) ? 1026RegistryKey.OpenRemoteBaseKey(RegistryHive.PerformanceData, _machineName);
System\Diagnostics\SharedPerformanceCounter.cs (1)
633RegistryKey categoryKey = null;
System.Management (2)
System\Management\ManagementScope.cs (2)
46RegistryKey s_switchesRegKey = null; 292RegistryKey netFrameworkSubKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\.NETFramework\");
System.Speech (6)
Internal\ObjectToken\RegistryDataKey.cs (6)
34protected RegistryDataKey(string fullPath, RegistryKey managedRegKey) : 96internal static RegistryDataKey Create(string keyId, RegistryKey hkey) 456RegistryKey? rootKey = RegKeyFromRootPath(rootPath); 486private static RegistryKey? RegKeyFromRootPath(string rootPath) 488ReadOnlySpan<RegistryKey> roots = 496foreach (RegistryKey key in roots)
System.Windows.Forms (14)
System\Windows\Forms\Application.cs (2)
139public static RegistryKey CommonAppDataRegistry 672public static RegistryKey UserAppDataRegistry
System\Windows\Forms\ComponentModel\COM2Interop\IComPropertyBrowser.cs (2)
48void LoadState(RegistryKey? key); 54void SaveState(RegistryKey? key);
System\Windows\Forms\Controls\Labels\LinkUtilities.cs (2)
29RegistryKey? key = Registry.CurrentUser.OpenSubKey(IESettingsRegPath); 128RegistryKey? key = null;
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (2)
2263void IComPropertyBrowser.SaveState(RegistryKey? key) 2277void IComPropertyBrowser.LoadState(RegistryKey? key)
System\Windows\Forms\Input\InputLanguage.cs (5)
110using RegistryKey? key = Registry.LocalMachine.OpenSubKey($@"{KeyboardLayoutsRegistryPath}\{LayoutId}"); 147using RegistryKey? key = Registry.LocalMachine.OpenSubKey(KeyboardLayoutsRegistryPath); 153using RegistryKey? subKey = key.OpenSubKey(subKeyName); 214using RegistryKey? key = Registry.CurrentUser.OpenSubKey(UserProfileRegistryPath); 219using RegistryKey? subKey = key.OpenSubKey(language);
System\Windows\Forms\Internal\RegistryKeyExtensions.cs (1)
10public static string? GetMUIString(this RegistryKey? key, string keyName, string fallbackKeyName)
System.Windows.Forms.Design (9)
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (1)
297using RegistryKey? regkey = Registry.LocalMachine.OpenSubKey(
System\Windows\Forms\Design\DocumentDesigner.AxToolboxItem.cs (6)
47using RegistryKey? key = Registry.ClassesRoot.OpenSubKey(controlKey); 50using RegistryKey? verKey = key?.OpenSubKey("Version"); 248using RegistryKey? key = Registry.ClassesRoot.OpenSubKey(controlKey) 255using RegistryKey? tlbKey = key.OpenSubKey("TypeLib"); 260using RegistryKey? verKey = key.OpenSubKey("Version"); 302using RegistryKey? inprocServerKey = key.OpenSubKey("InprocServer32");
System\Windows\Forms\Design\DocumentDesigner.cs (2)
752RegistryKey key = null; 753RegistryKey designtimeKey = null;
System.Windows.Forms.Primitives (2)
System\Windows\Forms\Internals\ScaleHelper.cs (1)
239using RegistryKey? key = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Accessibility");
Windows\Win32\Pinvoke.RegLoadMUIString.cs (1)
13public static unsafe bool RegLoadMUIString(RegistryKey key, string keyName, out string localizedValue)