Skip to content

net90_EventLogHelper.Interfaces_IRegistryReader_SubKeyExists

dparvin edited this page Sep 10, 2025 · 1 revision

IRegistryReader.SubKeyExists method

Checks whether a specific registry subkey exists under the given hive and path.

public bool SubKeyExists(RegistryHive hive, string machineName, string path)
parameter description
hive The root RegistryHive (e.g., RegistryHive.LocalMachine, RegistryHive.CurrentUser) where the lookup begins.
machineName The target machine name. Use "." to indicate the local machine.
path The registry subkey path relative to the hive (e.g., "SYSTEM\CurrentControlSet\Services\EventLog\Application").

Return Value

True if the subkey exists; otherwise, False.

Remarks

Useful for checking if required event log configuration keys exist before attempting to create or write to an event source.

See Also

Clone this wiki locally