• 博客园logo
  • 会员
  • 周边
  • 众包
  • 新闻
  • 博问
  • 闪存
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
wjshan0808

Learn from yesterday, Live for today, For a better tomorrow.
 ————wjshan0808

博客园    首页    新随笔    联系   管理    订阅  订阅

系统右键菜单添加剪贴板清空项(隐藏DOS窗口)

@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 

系统右键菜单添加剪贴板清空项(隐藏DOS窗口).bat


posted @ 2016-01-24 01:02  wjshan0808  阅读(778)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3