标题: [注册表类] [已解决]用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
- @echo off
- (
- 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 ""
- ) >nul 2>nul
复制代码
作者: 工具人 时间: 2023-7-16 21:24
回复 2# czjt1234
大佬厉害
作者: Batcher 时间: 2023-7-16 22:08
回复 1# 工具人 - reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\WinRAR.exe" /f /ve /t REG_SZ /d "%~dp0WinRAR.exe" >nul
- reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\WinRAR.exe" /f /v "Path" /t REG_SZ /d "%~dp0" >nul
- reg add "HKLM\SOFTWARE\Classes\WinRAR" /f /ve /t REG_SZ /d "RAR 压缩文件" >nul
- reg add "HKLM\SOFTWARE\Classes\WinRAR\DefaultIcon" /f /ve /t REG_SZ /d "%~dp0WinRAR.exe,0" >nul
- reg add "HKLM\SOFTWARE\Classes\WinRAR\shell\open\command" /f /ve /t REG_SZ /d "\"%~dp0WinRAR.exe\" \"%%1\"" >nul
- reg add "HKLM\SOFTWARE\Classes\WinRAR\shellex\ContextMenuHandlers\{B41DB860-64E4-11D2-9906-E49FADC173CA}" /f /ve /t REG_SZ /d "" >nul
复制代码
欢迎光临 批处理之家 (http://www.bathome.net/) |
Powered by Discuz! 7.2 |