Access windows 10 Registry

  • Thread starter Thread starter PrashadSri
  • Start date Start date
P

PrashadSri

Guest
Hi Dear Sir.

I want change firewall registry value, but i cant do this popup the error..

Hear my code, please tell me to solution, can you please give the sample code?


Microsoft.Win32.RegistryKey m_RegEntry = Microsoft.Win32.Registry.LocalMachine;
m_RegEntry =m_RegEntry.OpenSubKey(@"SYSTEM\CurrentControlSet\Services\MpsSvc",true);

if (m_RegEntry != null)
{
m_RegEntry.SetValue("Start", "4", RegistryValueKind.String);
m_RegEntry.Close();
}

Popup Error



System.Security.SecurityException: 'Requested registry access is not allowed.'



Thank You.

Continue reading...
 
Back
Top