How To Open Regedit In A Specified Sub Key

How To Open Regedit In A Specified Sub Key

Page 1 of 1

4 Replies - 3742 Views - Last Post: 09 August 2010 - 08:59 PM Rate Topic: -----

#1 BJseal91  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 68
  • Joined: 18-April 09

How To Open Regedit In A Specified Sub Key

Posted 09 August 2010 - 02:26 AM

Hi there dose anyone know how to open regedit with a certain subkey open when you click on a button

for example when I click the button it will start regedit in

Hkey_local_machine

Software

instead of opening at default

Code to open regedit is

Process.Start("Regedit.exe")


but not sure how to set it to open subkey automaticly


Any help much appricated

Bjseal91

Is This A Good Question/Topic? 0
  • +

Replies To: How To Open Regedit In A Specified Sub Key

#2 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1639
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: How To Open Regedit In A Specified Sub Key

Posted 09 August 2010 - 02:45 PM

You cannot, regedit.exe doesn't have any command line arguments that do this

This post has been edited by PsychoCoder: 09 August 2010 - 02:45 PM

Was This Post Helpful? 0
  • +
  • -

#3 Core  Icon User is offline

  • using System.Linq;
  • member icon

Reputation: 774
  • View blog
  • Posts: 5,097
  • Joined: 08-December 08

Re: How To Open Regedit In A Specified Sub Key

Posted 09 August 2010 - 02:53 PM

The last accessed key, for example, is stored in HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit\Lastkey. You can go from here and look at the source code here.
Was This Post Helpful? 2
  • +
  • -

#4 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1639
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: How To Open Regedit In A Specified Sub Key

Posted 09 August 2010 - 03:00 PM

I stand corrected. I searched for a long time to do this once and the only command line switches I found showed it to not be possible.
Was This Post Helpful? 0
  • +
  • -

#5 BJseal91  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 68
  • Joined: 18-April 09

Re: How To Open Regedit In A Specified Sub Key

Posted 09 August 2010 - 08:59 PM

Core
thank you for this information it did the trick
thanks for all replies this was a great find
code added to my collection
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1