?主要代碼:
@echo off
echo %1
copy %~nx0 c:\windows\system32
if "%1" NEQ "" (set regPath=%1) else (set /p regPath=輸入打開的注冊表路徑:)
:trimRight
if "%regPath:~-1%"=="\" set "regPath=%regPath:~0,-1%" & goto trimRight
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit" /v LastKey /t REG_SZ /d "%regPath%" /f
start regedit
使用方法,將上述代碼保存為 oRegedit.bat 文件:
1、雙擊oRegedit.bat文件,根據提示輸入要打開的注冊表目錄:
然后回車即可:
?
2、運行cmd命令,輸入oregedit??HKEY_CURRENT_USER\Software\Microsoft\Windows\
?
?可以達到同樣效果:
用命令打開注冊表可以快速定位到指定節點-其它文檔類資源-CSDN下載