Hey.. I'm trying to make a lastkey thing for the registry editor so that it will open right to a specific key.. here's hwat I have so far.. but it wont work. I get an 'object reference not set to an instance of an object' error.



VB Code:
  1. Dim test As RegistryKey
  2.             test= Registry.CurrentUser.OpenSubKey("\\Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\Regedit\\", True)
  3.             test.SetValue("lastkey", "Test")
  4.             Shell("regedit")