Board logo

标题: [注册表类] 请教一下 如何 添加 windwos右键菜单中加入bat安装[已解决] [打印本页]

作者: 5209520    时间: 2022-12-10 10:07     标题: 请教一下 如何 添加 windwos右键菜单中加入bat安装[已解决]

本帖最后由 5209520 于 2022-12-14 10:45 编辑

请教论坛大神   由于win10   双击安装软件 导致一些软件不能正常加载  需要新建批处理 用命令安装    能否把下面的  批处理  添加到右键菜单里   需要以管理员身份运行  只需点击一下即可  

cd  C:\AsialocalSetup
Asialocalmainreg.exe --install
作者: ANSL    时间: 2022-12-10 10:13

本帖最后由 ANSL 于 2022-12-10 10:18 编辑

回复 1# 5209520
存为reg文件
经测试,成功!
  1. Windows Registry Editor Version 5.00
  2. [HKEY_CLASSES_ROOT\*\shell\runas]
  3. @="添加菜单"
  4. "NoWorkingDirectory"=""
  5. [HKEY_CLASSES_ROOT\*\shell\runas\command]
  6. @="cmd.exe /c 批处理路径"
复制代码
把bat文件改成,存为ANSI
  1. @ echo off
  2. %1 mshta vbscript:CreateObject(“Shell.Application”).ShellExecute(“cmd.exe”,"/c %~s0 ::","",“runas”,1)(window.close)&&exit
  3. cd  C:\AsialocalSetup
  4. Asialocalmainreg.exe --install
复制代码

作者: 5209520    时间: 2022-12-10 12:00

谢谢 大神 我去看看
作者: 5209520    时间: 2022-12-10 12:55

回复 2# ANSL


    抱歉  我描述错了  我是想添加   在空白处 鼠标右键  新建 批处理运行             还有 我保存的那个批处理运行报错  改成这样不知道 行不行  @echo off  
%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit  
cd /d "%~dp0"  
cd  C:\AsialocalSetup
Asialocalmainreg.exe --install
pause
作者: ANSL    时间: 2022-12-10 13:13

回复 4# 5209520emmmm.....
想添加菜单快速新建批处理是吗?

作者: 5209520    时间: 2022-12-10 13:16

回复 5# ANSL


   对
作者: ANSL    时间: 2022-12-10 14:16

回复 6# 5209520
  1. Windows Registry Editor Version 5.00
  2. [HKEY_CLASSES_ROOT\*\shell\runas]
  3. @="添加菜单"
  4. "NoWorkingDirectory"=""
  5. [HKEY_CLASSES_ROOT\*\shell\runas\command]
  6. @="cmd.exe /c echo.>1.bat&copy 1.bat C:\新建.bat"
复制代码
新建bat文件在C:\
作者: 5209520    时间: 2022-12-10 19:28

回复 7# ANSL


    谢谢你热心帮助
作者: ANSL    时间: 2022-12-11 09:01

回复 8# 5209520
问题解决了吗?如解决请在标题标上[已解决]
并给回答者加分(疯狂暗示:我分呢?)




欢迎光临 批处理之家 (http://bbs.bathome.net/) Powered by Discuz! 7.2