|
本帖最后由 wu733 于 2024-9-4 06:00 编辑
昨天qq8899399分享的鼠标右键 使用SYSTEM权限打开 CMD窗口 绿色版一贴中的SuperCMD工具,经我研究可以拆分成以下两个功能(提取的SuperCMD原版的注册表,未作改动):
一、右键添加“在此处打开SuperCMD”
1、提取SuperCMD工具安装文件夹并打包;下载链接:https://www.123pan.com/s/jctA-YXp6d 提取码:1RnI
2、解压SuperCMD.7z,并将SuperCMD文件夹拷贝至C:\Program Files下;
3、导入以下注册表:
Windows Registry Editor Version 5.00
;Classes\Directory\Background\shell
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\OpenCmdHereSuperCMD]
@="在此处打开 SuperCMD"
"Icon"="C:\\Program Files\\SuperCMD\\SuperCMDx64.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\OpenCmdHereSuperCMD\command]
@="C:\\Program Files\\SuperCMD\\SuperCMDx64.exe /ShowWait /TI /Run:\"cmd.exe\" /s,/k, pushd,%V & \"cmd.exe\" /s,/k, Title SuperCMD SYSTEM 权限"
;Classes\Directory\shell
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\OpenCmdHereSuperCMD]
@="在此处打开 SuperCMD"
"Icon"="C:\\Program Files\\SuperCMD\\SuperCMDx64.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\OpenCmdHereSuperCMD\command]
@="C:\\Program Files\\SuperCMD\\SuperCMDx64.exe /ShowWait /TI /Run:\"cmd.exe\" /s,/k, pushd,%V & \"cmd.exe\" /s,/k, Title SuperCMD SYSTEM 权限"
;Classes\Drive\shell
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Drive\shell\OpenCmdHereSuperCMD]
@="在此处打开 SuperCMD"
"Icon"="C:\\Program Files\\SuperCMD\\SuperCMDx64.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Drive\shell\OpenCmdHereSuperCMD\command]
@="C:\\Program Files\\SuperCMD\\SuperCMDx64.exe /ShowWait /TI /Run:\"cmd.exe\" /s,/k, pushd,%V & \"cmd.exe\" /s,/k, Title SuperCMD SYSTEM 权限"
;Classes\LibraryFolder\background\shell
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\LibraryFolder\background\shell] ;新建shell子项,原版系统无此项
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\LibraryFolder\background\shell\OpenCmdHereSuperCMD]
@="在此处打开 SuperCMD"
"Icon"="C:\\Program Files\\SuperCMD\\SuperCMDx64.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\LibraryFolder\background\shell\OpenCmdHereSuperCMD\command]
@="C:\\Program Files\\SuperCMD\\SuperCMDx64.exe /ShowWait /TI /Run:\"cmd.exe\" /s,/k, pushd,%V & \"cmd.exe\" /s,/k, Title SuperCMD SYSTEM 权限"
PS:当然你也可以将第2步的SuperCMD文件夹拷贝至其它路径,然后将注册表中的C:\\Program Files改为对应路径即可。
二、右键添加“以SYSTEM身份运行”
1、解压SuperCMD.7z,并将SuperCMD文件夹拷贝至C:\Program Files下;
2、导入以下注册表:
Windows Registry Editor Version 5.00
;Classes\batfile
[HKEY_CURRENT_USER\Software\Classes\batfile] ;新建batfile子项,原版系统无此项
[HKEY_CURRENT_USER\Software\Classes\batfile\shell] ;新建shell子项
[HKEY_CURRENT_USER\Software\Classes\batfile\shell\runasSYSTEM_TI]
@="以 S&YSTEM身份运行 (TI)"
"MultiSelectModel"="Single"
"Icon"="C:\\Program Files\\SuperCMD\\SuperCMDx64.exe"[HKEY_CURRENT_USER\Software\Classes\batfile\shell\runasSYSTEM_TI\command]
@="\"C:\\Program Files\\SuperCMD\\SuperCMDx64.exe\" /TI /ShowWait /Run:\"%1\" %*"
;Classes\cmdfile
[HKEY_CURRENT_USER\Software\Classes\cmdfile] ;新建cmdfile子项,原版系统无此项
[HKEY_CURRENT_USER\Software\Classes\cmdfile\shell] ;新建shell子项
[HKEY_CURRENT_USER\Software\Classes\cmdfile\shell\runasSYSTEM_TI]
@="以 S&YSTEM身份运行 (TI)"
"MultiSelectModel"="Single"
"Icon"="C:\\Program Files\\SuperCMD\\SuperCMDx64.exe"
[HKEY_CURRENT_USER\Software\Classes\cmdfile\shell\runasSYSTEM_TI\command]
@="\"C:\\Program Files\\SuperCMD\\SuperCMDx64.exe\" /TI /ShowWait /Run:\"%1\" %*"
;Classes\exefile
[HKEY_CURRENT_USER\Software\Classes\exefile] ;新建exefile子项,原版系统无此项
[HKEY_CURRENT_USER\Software\Classes\exefile\shell] ;新建shell子项
[HKEY_CURRENT_USER\Software\Classes\exefile\shell\runasSYSTEM_TI]
@="以 S&YSTEM身份运行 (TI)"
"MultiSelectModel"="Single"
"Icon"="C:\\Program Files\\SuperCMD\\SuperCMDx64.exe"
[HKEY_CURRENT_USER\Software\Classes\exefile\shell\runasSYSTEM_TI\command]
@="\"C:\\Program Files\\SuperCMD\\SuperCMDx64.exe\" /TI /ShowWait /Run:\"%1\" %*"
吐槽:已经如上新增子项,现在的软件作者真的是肆意妄为啊,由于提取的是SuperCMD原版的注册表,故保持不变。在[HKEY_LOCAL_MACHINE\Software\Classes\下会死?
问题:此时右键菜单存在两个类似的项目,“以管理员身份运行(A)”和"以SYSTEM身份运行(TI)",如下图。那么如何去掉系统自带的这个“以管理员身份运行(A)”呢?
感谢Bluebells,如何删除右键“以管理员身份运行(A)”?导入以下注册表即可:
Windows Registry Editor Version 5.00
;删除右键“以管理员身份运行(A)”
[-HKEY_CLASSES_ROOT\exefile\shell\runas]
|
|