Jump to content

RegJump


Plamdi

Recommended Posts

If you've ever used the Sysinternals REGJUMP you will have noticed it lanuches RegEdit - and THEN navigates to the correct Key. I have a question? What stops them from using the Microsoft allocated Value to store the start Key in? Answer: Nothing.

Save as REGJUMP.CMD:

@ECHO OFF
IF NOT "%1"=="" GOTO NEXT
ECHO Launches Regedit to specified key.
ECHO.
ECHO REGJUMP key
ECHO.
ECHO key Specifies the registry key to go to.
ECHO.
ECHO Example:
ECHO REGJUMP HKCR\pngfile\DefaultIcon
ECHO.
ECHO Known limitations: Key name cannot contain certain characters.
ECHO REGJUMP is Freeware, (c) 2006 Plamdi.com.
GOTO END
:NEXT
SETLOCAL ENABLEEXTENSIONS
SET K=%*
IF NOT %1==%~1 SET K=%~1
IF %K:~0,4%==HKLM SET K=HKEY_LOCAL_MACHINE%K:~4%
IF %K:~0,4%==HKCU SET K=HKEY_CURRENT_USER%K:~4%
IF %K:~0,4%==HKCR SET K=HKEY_CLASSES_ROOT%K:~4%
IF %K:~0,4%==HKCC SET K=HKEY_CURRENT_CONFIG%K:~4%
IF %K:~0,3%==HKU SET K=HKEY_USERS%K:~3%
REG QUERY "%K%">NUL
IF ERRORLEVEL 1 GOTO END
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit" /V "LastKey" /D "My Computer\%K%" /F
"%SYSTEMROOT%\REGEDIT.EXE"
:END
SETLOCAL DISABLEEXTENSIONS

And yeah, I'll probably make a better compiled .EXE version written in C++ ... but until then this should do. Launches Regedit AT the required key.

Another interesting fact is that my version does not launch RegEdit if the Key does not exisit.

Edited by Plamdi
Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...