johnm

Distinguished
Apr 21, 2004
14
0
18,510
Archived from groups: microsoft.public.windowsxp.customize (More info?)

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
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.customize (More info?)

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

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

"johnm" wrote:

| 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
 

kelly

Distinguished
Apr 14, 2004
1,761
0
19,780
Archived from groups: microsoft.public.windowsxp.customize (More info?)

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



"johnm" <whatever@user.net> wrote in message
news:OvHogsIiFHA.708@TK2MSFTNGP09.phx.gbl...
> 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
>
 

johnm

Distinguished
Apr 21, 2004
14
0
18,510
Archived from groups: microsoft.public.windowsxp.customize (More info?)

thank you...!
just what I was looking for.


"johnm" <whatever@user.net> wrote in message
news:OvHogsIiFHA.708@TK2MSFTNGP09.phx.gbl...
> 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
>