Вы можете использовать функцию Registry.SetValue .
Пример:
const string userRoot = "HKEY_CURRENT_USER";
const string subkey = "RegistrySetValueExample";
const string keyName = userRoot + "\\" + subkey;
// An int value can be stored without specifying the
// registry data type, but long values will be stored
// as strings unless you specify the type. Note that
// the int is stored in the default name/value
// pair.
Registry.SetValue(keyName, "", 5280);
Registry.SetValue(keyName, "TestLong", 12345678901234,
RegistryValueKind.QWord);
keyName String
Полный путь к ключу реестра, начиная с действительного реестра root, например, "HKEY_CURRENT_USER".