MoonPoint Support Logo

 

Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
January
Sun Mon Tue Wed Thu Fri Sat
         
24
           
2016
Months
Jan


Sun, Jan 24, 2016 9:45 pm

Using reg query to determine the last registry key accessed

You can determine the last Windows Registry key accessed in regedit by issuing a reg query command from a command prompt. E.g., suppose I ran regedit and viewed HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run and then exited from regedit.

Regedit - Accessed HKCU Run

From a command line interface (CLI), i.e., a command prompt, I can issue the command reg query HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit /v LastKey, which will show me the last key that was accessed while in regedit. If I reopen regedit, it will start with that key selected, i.e., it will open from the key selected when I exited from the program.

C:\>reg query HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit /v LastKey

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit
    LastKey    REG_SZ    Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run


C:\>

Note: the command is querying a key in HKEY Current User (HKCU), so the results apply to the account from which the command is run. If you run the command from a different account on the system, you will get the LastKey value for that account.

[/os/windows/registry] permanent link

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo