change registry startup view?

  • Thread starter Thread starter johnm
  • Start date Start date
J

johnm

What is the reghack used to prevent the Registry Editor from opening at the
last view?

I'd like to have regedit open at the root each time it starts, not the last
key viewed....

TIA
 
Bypasses Regedit's "memory" of the last key visited
http://www.dougknox.com/xp/scripts_desc/regopen.htm

--
Carey Frisch
Microsoft MVP
Windows XP - Shell/User
Microsoft Newsgroups

Get Windows XP Service Pack 2 with Advanced Security Technologies:
http://www.microsoft.com/athome/security/protect/windowsxp/choose.mspx

-------------------------------------------------------------------------------------------

:

| What is the reghack used to prevent the Registry Editor from opening at the
| last view?
|
| I'd like to have regedit open at the root each time it starts, not the last
| key viewed....
|
| TIA
 
Several options:

Registry - Clear Last State (Line 47)
http://www.kellys-korner-xp.com/xp_tweaks.htm

More information here:

Registry - Last State
http://www.kellys-korner-xp.com/xp_qr.htm#xp_registry

How to Prevent Regedit.exe from Using the Last State (Q244004)
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q244004

After you start Regedit, press and hold down SHIFT+LEFT ARROW to collapse
all the entries back to the My Computer entry.

Start/Run/Regedit
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit.
In the right pane, for the value LastKey.

Double-click it and clear the string. Then right-click the Regedit key (in
the lefthand pane) and select Permissions. Set Permissions to Deny for
any/all users/groups.

The vbs script below will delete the last applet subkey and create a Regedit
favorite "Last Exit Key" with the subkey data, so that you can choose the
last key visited as a Regedit favorite if you wish (the best of both
worlds). Then it runs Regedit, which will open collapsed. Should work on
both WinMe and WinXP, and is harmless on other versions.

Simply cut and paste to a new VBS file, create a shortcut to the VBS file,
reselect the Regedit icon, and run Regedit from here.

Option Explicit

Dim oShell, vData, vPath

Set oSHELL= WScript.CreateObject("WScript.Shell")
vData= ""
vPath= "HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit\"

On Error Resume Next
Do
vData= oSHELL.RegRead(vPath & "LastKey"): If Err Then Exit Do
If vData<>"My Computer" Then
oSHELL.RegWrite vPath & "Favorites\Last Exit Key", vData, "REG_SZ"
If Err Then Exit Do
oSHELL.RegDelete vPath & "LastKey"
End If
Loop Until True
Err.Clear: On Error GoTo 0

oSHELL.Run "regedit.exe", 1, False

WScript.Quit

--

All the Best,
Kelly (MS-MVP)

Troubleshooting Windows XP
http://www.kellys-korner-xp.com
 
Back
Top