Installer Custom Action problem – can’t write to register key

Try to change:
RegistryKey key = Registry.LocalMachine.OpenSubKey(key_path);

To:
RegistryKey key = Registry.LocalMachine.OpenSubKey(key_path, Microsoft.Win32.RegistryKeyPermissionCheck.ReadWriteSubTree);

Leave a Comment