c# - Is it possible to open regedit and navigate to straight to a specific key using process.start? -


i'm making small tool can write key in registry, , tiny part of convenience navigate key instantly click of button. know how open regedit.exe there way instantly navigate key need? i'm trying

system.diagnostics.process.start("regedit.exe" + "c/ hkey_local_machine");

but think it's trying write key registry.

thanks in advance!

edit:

@arran

-actually tool myself mainly. i'm still newb @ c# or programming in general, , learning on own. program 1/2 test of can , 1/2 utility later work. goal able write key registry , after able navigate , delete in seconds out having manually search through regedit.

edit:

@hans passant

thank information! guess if it's hard implement, it's not worth time , effort.

this thread bit old bit if else ends here googling works.

  1. set lastkey path want regedit open in
  2. launch regedit.

example:

var registrylocation =  "your key here"; var registrylastkey = @"hkey_current_user\software\microsoft\windows\currentversion\applets\regedit";                try     {         registry.setvalue(registrylastkey, "lastkey", registrylocation); // set lastkey value regedit go directly         process.start("regedit.exe");     }     catch (exception ex)     {         messagebox.show(ex.message, "error", messageboxbuttons.ok, messageboxicon.error);     } 

Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -