@color 0A @title 系统右键菜单添加剪贴板清空项(隐藏DOS窗口) by wjshan0808 @echo off echo 请输入右键菜单名称 set /p name= ::创建本机APPDATA数据文件夹md=mkdir set dpath=%APPDATA%\%name% if exist %dpath% rd /s /q %dpath% if not exist %dpath% md %dpath% rem 创建%name%.vbs脚本文件 set fpath=%dpath%\%name%.vbs if exist %fpath% del /f /q %fpath% echo ‘ echo off ^| clip 命令为清空剪贴板 >>%fpath% echo ‘ ,0表示隐藏DOS窗口 >>%fpath% echo CreateObject("WScript.Shell").Run "%ComSpec% /q /c echo off | clip",0 >>%fpath% ::增加文件(夹)属性 attrib +R +A +S +H +I %dpath% /S /D echo 添加右键菜单 >nul reg add HKEY_CLASSES_ROOT\Directory\Background\shell\%name%\command /ve /t reg_sz /d "%SystemRoot%\System32\wscript.exe %fpath%" /f
原文:http://www.cnblogs.com/wjshan0808/p/5154458.html