![]() |
中国DOS联盟-- 联合DOS 推动DOS 发展DOS --联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum |
| 游客 | 登录 | 注册 | 会员 | 搜索 | 中国DOS联盟 |
|
中国DOS联盟论坛 现在时间是 2026-08-06 15:55 |
共 48,039 主题排行 / 350,124 发帖 / 今日 0 篇 / 48,251 会员排行 |
| DOS批处理 & 脚本技术(批处理室) » [求助]个性化鼠標右键 IF...Goto...&start(已解决) |
| 可打印版本 785 / 2 |
| 第1楼 ad2033 | 发表于 2007-11-22 22:15 |
| 新手上路 发帖 3 积分 8 来自 湖北 | |
|
[求助]个性化鼠標右键 IF...Goto...&start(已解决) @echo off
title 个性化鼠標右键 echo 背景编号: echo 1=背景1 2=背景2 3=背景3 echo off :index set /p img=输入背景编号: if "%img%"=="1" goto cp1 if "%img%"=="2" goto cp2 if "%img%"=="3" goto cp3 ::上面如果输入其它所有字符则回显:请正确输入上面已有的编号! 并goto index 应该怎么写? :cp1 copy ContextBG-mm1.dll "%SystemRoot%\" >nul" :cp2 copy ContextBG-mm2.dll "%SystemRoot%\" >nul" :cp3 copy ContextBG-mm3.dll "%SystemRoot%\" >nul" ::下面的问题是3个命令都运行了..我想让它根据上面的输入的编号来执行对应的start.应该怎么写..? 前提:如果指定的目录存在该文件则执行start 如来不存在则回显:"设置背景失败.可能……"并 goto index IF EXIST "%SystemRoot%\ContextBG-mm1.dll" GOTO start IF EXIST "%SystemRoot%\ContextBG-mm2.dll" GOTO start2 IF EXIST "%SystemRoot%\ContextBG-mm3.dll" GOTO start3 :start regsvr32 %SystemRoot%\ContextBG-mm1.dll :start2 regsvr32 %SystemRoot%\ContextBG-mm2.dll :start3 regsvr32 %SystemRoot%\ContextBG-mm3.dll ::如果执行成功..回显:…… 怎么写? echo 设置成功!如果看不到效果请注消或重启一次就OK! pause & exit 请各位达人.元老..指点一下. 谢谢! [ Last edited by ad2033 on 2007-11-23 at 03:11 PM ] |
|
| 第2楼 sinbao | 发表于 2007-11-23 13:22 |
| 初级用户 发帖 73 积分 184 | |
|
[ Last edited by sinbao on 2007-11-23 at 01:37 PM ] |
|
| 第3楼 ad2033 | 发表于 2007-11-23 14:36 |
| 新手上路 发帖 3 积分 8 来自 湖北 | |
|
Thanks sinbao
问题解决! [ Last edited by ad2033 on 2007-11-23 at 03:08 PM ] |
|
|
[ 联系联盟系统管理团队 -
中国DOS联盟 -
标准版 ] Sponsored by ifanr Inc | © 2001–2023 |