Board logo

标题: [注册表类] [已解决]用reg add添加注册表如何不在窗口显示操作执行完成字样 [打印本页]

作者: 工具人    时间: 2023-7-16 20:39     标题: [已解决]用reg add添加注册表如何不在窗口显示操作执行完成字样

reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\WinRAR.exe" /f /ve /t REG_SZ /d "%~dp0WinRAR.exe"
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\WinRAR.exe" /f /v "Path" /t REG_SZ /d "%~dp0"
reg add "HKLM\SOFTWARE\Classes\WinRAR" /f /ve /t REG_SZ /d "RAR 压缩文件"
reg add "HKLM\SOFTWARE\Classes\WinRAR\DefaultIcon" /f /ve /t REG_SZ /d "%~dp0WinRAR.exe,0"
reg add "HKLM\SOFTWARE\Classes\WinRAR\shell\open\command" /f /ve /t REG_SZ /d "\"%~dp0WinRAR.exe\" \"%%1\""
reg add "HKLM\SOFTWARE\Classes\WinRAR\shellex\ContextMenuHandlers\{B41DB860-64E4-11D2-9906-E49FADC173CA}" /f /ve /t REG_SZ /d ""


比如上面的批处理,执行后每一条都会返回一个操作执行完成的提示,有没有参数可以让其不出现或只出现一次
作者: czjt1234    时间: 2023-7-16 20:42

  1. @echo off
  2. (
  3. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\WinRAR.exe" /f /ve /t REG_SZ /d "%~dp0WinRAR.exe"
  4. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\WinRAR.exe" /f /v "Path" /t REG_SZ /d "%~dp0"
  5. reg add "HKLM\SOFTWARE\Classes\WinRAR" /f /ve /t REG_SZ /d "RAR 压缩文件"
  6. reg add "HKLM\SOFTWARE\Classes\WinRAR\DefaultIcon" /f /ve /t REG_SZ /d "%~dp0WinRAR.exe,0"
  7. reg add "HKLM\SOFTWARE\Classes\WinRAR\shell\open\command" /f /ve /t REG_SZ /d "\"%~dp0WinRAR.exe\" \"%%1\""
  8. reg add "HKLM\SOFTWARE\Classes\WinRAR\shellex\ContextMenuHandlers\{B41DB860-64E4-11D2-9906-E49FADC173CA}" /f /ve /t REG_SZ /d ""
  9. ) >nul 2>nul
复制代码

作者: 工具人    时间: 2023-7-16 21:24

回复 2# czjt1234


    大佬厉害
作者: Batcher    时间: 2023-7-16 22:08

回复 1# 工具人
  1. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\WinRAR.exe" /f /ve /t REG_SZ /d "%~dp0WinRAR.exe" >nul
  2. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\WinRAR.exe" /f /v "Path" /t REG_SZ /d "%~dp0" >nul
  3. reg add "HKLM\SOFTWARE\Classes\WinRAR" /f /ve /t REG_SZ /d "RAR 压缩文件" >nul
  4. reg add "HKLM\SOFTWARE\Classes\WinRAR\DefaultIcon" /f /ve /t REG_SZ /d "%~dp0WinRAR.exe,0" >nul
  5. reg add "HKLM\SOFTWARE\Classes\WinRAR\shell\open\command" /f /ve /t REG_SZ /d "\"%~dp0WinRAR.exe\" \"%%1\"" >nul
  6. reg add "HKLM\SOFTWARE\Classes\WinRAR\shellex\ContextMenuHandlers\{B41DB860-64E4-11D2-9906-E49FADC173CA}" /f /ve /t REG_SZ /d "" >nul
复制代码





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