locked
How do you use My.Computer.Registry.LocalMachine.DeleteValue? RRS feed

  • Question

  • I've tried to delete a value by using

    My.Computer.Registry.LocalMachine.DeleteValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout\Scancode Map")

    and

    My.Computer.Registry.LocalMachine.DeleteValue("SYSTEM\CurrentControlSet\Control\Keyboard Layout\Scancode Map")

    where Scancode Map is the Value name but I get the error

    System.ArgumentException was unhandled
      Message="No value exists with that name."
     

    how do I use this correctly??

    Saturday, June 17, 2006 4:11 AM

Answers

  • Hello. The correct way to delete the value is:

    My.Computer.Registry.LocalMachine.OpenSubKey("SYSTEM\CurrentControlSet\Control\Keyboard Layout").DeleteValue("Scancode Map")

    Saturday, June 17, 2006 1:03 PM