How to launch Windows' RegEdit with certain path?

前端 未结 13 1133
盖世英雄少女心
盖世英雄少女心 2020-12-08 04:15

How do I launch Windows\' RegEdit with certain path located, like \"HKEY_CURRENT_USER\\Software\\Microsoft\\VisualStudio\\8.0\", so I don\'t have to do the clic

13条回答
  •  南笙
    南笙 (楼主)
    2020-12-08 04:34

    Copy the below text and save it as a batch file and run

    @ECHO OFF
    SET /P "showkey=Please enter the path of the registry key: "
    REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit" /v "LastKey" /d "%showkey%" /f
    start "" regedit
    

    Input the path of the registry key you wish to open when the batch file prompts for it, and press Enter. Regedit opens to the key defined in that value.

提交回复
热议问题