C# Full Registry Access

  • Thread starter Thread starter msoftx
  • Start date Start date
M

msoftx

Guest
How to get full access to the registry HKLM using windows forms?

For Example:

I can not write value in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon


RegistryKey key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", true);
if (key != null)
{
key.SetValue("DefaultUserName", "UserName", RegistryValueKind.String);
key.Close();
}

Does not work either:


Process regeditProcess = Process.Start("regedit.exe", "/s " + scryptPath);
regeditProcess.WaitForExit();


I run the Application as an Administrator

Continue reading...
 
Back
Top