- Home /
Authorization to write registry to HKEY_CLASSES_ROOT
■Situation
I don't know how to authorize HKEY_CLASSES_ROOT to write the registry. I did some research and created an "application manifest file" and created an executable file, but I get an error (UnauthorizedAccessException) that I do not have permission. The manifest file is placed in the \Assets\Mainfest. If I create an exe and start it with administrator privileges, I can write to it. The manifest permission write is not working? What is wrong with this, I would appreciate it if you could tell me as I have no knowledge at all.
■Creation code
private static void AddRegistryTEST()
{
using (Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.ClassesRoot.CreateSubKey(@"TEST", true))
{
if (key != null)
{
//REG_SZ Writing
key.SetValue("TEST", Microsoft.Win32.RegistryValueKind.String);
key.Close();
}
else
{
Debug.LogError("Error");
}
}
Your answer
Follow this Question
Related Questions
Standalone OSX players can't start after having been through DropBox 0.7.110 1 Answer
Weird Permissions When Building Android APK 1 Answer
Which permission/How to upload screenshot to Facebook after 2018 May (Cambridge event) 1 Answer
Get Facebook Profile Picture Permissions From Dev Token 0 Answers