DIGIT-ARC read-only archive · snapshot: July 23, 2026

Collapse Regedit Tree Without Disabling

2 posts · originally from https://geek.digit.in/community/threads/collapse-regedit-tree-without-disabling.33721/

rakeshishere
rakeshishere Original post #1
Aug 10, 2006 at 1:03 AM
RegEdit annoyingly remembers the last key you viewed and then the next time you use the application, it is expanded to that section. There are other tweeks that change the permissions on the Regedit applet in the registry to deny access.

That does work. However, in the process, you lose the ability to create favorites.

A few lines of code solves the problem. You can then create a shortcut to the .vbs file and change the icon to the regedit icon and put it on the desktop, add it to a start menu, whatever. Just put these few lines in a text editor [FONT=Courier,&quot][FONT=Courier,&quot][/FONT][/FONT]and save as the xxxxxx.vbs.

***********************************************

Dim objShell, RegKey, Q

Set objShell = CreateObject("WScript.Shell")

strQuote = chr(34)

RegKey = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit"

RegKey = RegKey & "\LastKey"

objShell.RegWrite RegKey, ""

objShell.Run "regedit"

***********************************************
blueshift
Aug 10, 2006 at 4:26 PM
why dont you just put up the links to the source?:mad: