RegDeleteKey

[DllImport("coredll.dll", SetLastError = true, CharSet = CharSet.Unicode)]
public static extern int RegDeleteKey(
   IntPtr hKey,
   string lpSubKey
);

Microsoft documentation: Link

Last updated