locked
Access windows 10 reg RRS feed

  • Question

  • 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.

    Thursday, September 12, 2019 5:22 AM

Answers

All replies