Correctly open registry key as writeable.

This commit is contained in:
2017-05-16 14:43:48 +01:00
parent 0c872b5147
commit d7412a5c85

View File

@@ -216,13 +216,14 @@ namespace osrepodbmgr.Core
case DiscImageChef.Interop.PlatformID.WinCE:
case DiscImageChef.Interop.PlatformID.WindowsPhone:
{
RegistryKey parentKey = Registry.CurrentUser.OpenSubKey("SOFTWARE").CreateSubKey("Canary Islands Computer Museum");
RegistryKey parentKey = Registry.CurrentUser.OpenSubKey("SOFTWARE", true).CreateSubKey("Canary Islands Computer Museum");
RegistryKey key = parentKey.CreateSubKey("OSRepoDBMgr");
key.SetValue("TemporaryFolder", Current.TemporaryFolder);
key.SetValue("DatabasePath", Current.DatabasePath);
key.SetValue("RepositoryPath", Current.RepositoryPath);
key.SetValue("UnArchiverPath", Current.UnArchiverPath);
if (Current.UnArchiverPath != null)
key.SetValue("UnArchiverPath", Current.UnArchiverPath);
key.SetValue("CompressionAlgorithm", Current.CompressionAlgorithm);
}
break;