Hello,
i have problem cause when i try to write to hkey_local_machine, i get an exception with message
the code looks like this:The parameter is incorrect.
i was looking for the solution in the internet, but i only found that the couse can be the lack of administrator privileges..Code:objReg = Registry.LocalMachine; RegistryKey obj = objReg.OpenSubKey(Key, true); if (obj == null) { objReg.CreateSubKey(Key).SetValue(Value, ""); } else { objReg.SetValue(Value, ""); }
i added this part:
With no resultCode:[assembly: RegistryPermissionAttribute(SecurityAction.RequestMinimum, ViewAndModify = "HKEY_LOCAL_MACHINE")]
do you know what cases this problem?
Cheers




Reply With Quote