複数のブランチの下にある Windows のレジストリから値を取得しようとしています。
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\...
次のコードがあるとします。
RegistryKey openSubKey = settings.OpenSubKey(
@"\\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\DefaultSpoolDirectory");
openSubKey.SetValue("printername", "");
で設定が LocalMachine に設定されている場所Microsoft.Win32.Registry
。
ただし、コードの最初の行の後に null を取得します。何を与える?