0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

[C#]レジストリに登録する

Posted at

レジストリの値を変える

/// <summary>
/// レジストリ登録
/// </summary>
public class SetRegistry
{
    private static RegistryKey regKeySystemQR;

    public static void String(string sRegKey, string value)
    {
        regKeySystemQR = Registry.LocalMachine.OpenSubKey(%サブキー文字列%, RegistryKeyPermissionCheck.ReadWriteSubTree);
        regKeySystemQR.SetValue(sRegKey, value, RegistryValueKind.String);
        regKeySystemQR.Flush();
    }

    public static void DWord(string sRegKey, int value)
    {
        regKeySystemQR = Registry.LocalMachine.OpenSubKey(%サブキー文字列%, RegistryKeyPermissionCheck.ReadWriteSubTree);
        regKeySystemQR.SetValue(sRegKey, value, RegistryValueKind.DWord);
        regKeySystemQR.Flush();
    }
}
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?