|
我是用的批处理,vbs不会.
安装.bat:
- @echo off&color 1f
- copy 注册表快速定位.bat "%windir%"
- ::文件右键
- reg add "HKCR\*\shell\注册表定位" /ve /d "注册表定位" /f
- reg add "HKCR\*\shell\注册表定位\command" /ve /t REG_EXPAND_SZ /d "%windir%\注册表快速定位.bat" /f
- ::目录右键
- reg add "HKCR\Directory\shell\注册表定位" /ve /d "注册表定位" /f
- reg add "HKCR\Directory\shell\注册表定位\command" /ve /t REG_EXPAND_SZ /d "%windir%\注册表快速定位.bat" /f
复制代码
卸载.bat:
- @echo off&color 1f
- reg delete "HKCR\*\shell\注册表定位" /f
- reg delete "HKCR\Directory\shell\注册表定位" /f
- del "%windir%\注册表快速定位.bat"
复制代码
注册表快速定位.bat:
- @echo off&color 1f&echo.
- echo [注册表快速定位]
- echo.
- echo 1.粘贴或键入注册表项,然后回车 ─→ 打开指定的注册表项
- echo.
- echo 例如 右键菜单的注册表项
- echo.
- echo 请输入:HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell
- echo 或 请输入:HKLM\SOFTWARE\Classes\*\shell
- echo.
- echo 2.直接回车 ─→ 打开注册表根目录
- echo.
- echo 输入错误的注册表项,也会打开注册表根目录
- echo.
- echo 3.关闭窗口 ─→ 退出
- echo.
- set rr=
- set /p rr= 请输入:
- if "%rr%" == "" (
- reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit" /v "LastKey" /f
- if exist "%windir%\regedit.exe" (
- start %windir%\regedit.exe & exit
- ) else (
- start regedit & exit
- )
- )
- if /i "%rr:~0,4%" == "HKCR" set rr=HKEY_CLASSES_ROOT%rr:~4%
- if /i "%rr:~0,4%" == "HKCU" set rr=HKEY_CURRENT_USER%rr:~4%
- if /i "%rr:~0,4%" == "HKLM" set rr=HKEY_LOCAL_MACHINE%rr:~4%
- if /i "%rr:~0,4%" == "HKCC" set rr=HKEY_CURRENT_CONFIG%rr:~4%
- if /i "%rr:~0,3%" == "HKU" set rr=HKEY_USERS%rr:~3%
- reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit" /v "LastKey" /d "%rr%" /f
- if exist "%windir%\regedit.exe" (
- start %windir%\regedit.exe & exit
- ) else (
- start regedit & exit
- )
复制代码
|
|