中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

中国DOS联盟论坛
现在时间是 2026-08-02 00:25
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [求助]关于快捷方式的(决非烙铁) 查看 955 回复 1
楼 主 [求助]关于快捷方式的(决非烙铁) 发表于 2006-09-09 05:16 ·  中国 江苏 苏州 吴江区 电信
初级用户
积分 100
发帖 39
注册 2005-10-27 22:50
20年会员
UID 44177
状态 离线
我需要用bat创建快捷方式。
以前搜索论坛,有两种。
第一种用一个类似的模仿,不可取。
另一个用了“Shortcut.exe”
本来用的蛮好的,但是发现一个大问题。
Shortcut.exe反映不够
怎么说呢
任务多的时候会出现漏网的现在。
例如
rd /s /q "%allusersprofile%\「开始」菜单\程序\附件\系统工具"
rd /s /q "%userprofile%\「开始」菜单\程序\附件"
if not exist "%allusersprofile%\「开始」菜单\程序\附件" md "%allusersprofile%\「开始」菜单\程序\附件"
shortcut /f:"%allusersprofile%\「开始」菜单\程序\附件\画图.lnk" /a:c /t:"%windir%\system32\mspaint.exe" /w:"d:"
shortcut /f:"%allusersprofile%\「开始」菜单\程序\附件\计算器.lnk" /a:c /t:"%windir%\system32\calc.exe"
shortcut /f:"%allusersprofile%\「开始」菜单\程序\记事本.lnk" /a:c /t:"%windir%\system32\notepad.exe"

rd /s /q "%userprofile%\「开始」菜单\程序\游戏"
rd /s /q "%allusersprofile%\「开始」菜单\程序\游戏"
md "%allusersprofile%\「开始」菜单\程序\游戏"
shortcut /f:"%allusersprofile%\「开始」菜单\程序\游戏\接龙.lnk" /a:c /t:"%windir%\system32\freecell.exe"
shortcut /f:"%allusersprofile%\「开始」菜单\程序\游戏\扫雷.lnk" /a:c /t:"%windir%\system32\winmine.exe"
shortcut /f:"%allusersprofile%\「开始」菜单\程序\游戏\纸牌.lnk" /a:c /t:"%windir%\system32\spider.exe"
shortcut /f:"%allusersprofile%\「开始」菜单\程序\游戏\蜘蛛.lnk" /a:c /t:"%windir%\system32\sol.exe"

执行的时候有时候会漏掉?不清楚怎么回事。
不知道有没有更好的解决方案啊?
2 发表于 2006-09-09 10:21 ·  中国 山西 大同 中移铁通
元老会员
★★★★
Batchinger
积分 4,432
发帖 1,512
注册 2002-10-18 00:00
23年会员
UID 19
性别 男
状态 离线
Re mrhjzhang:

请告知此问题是随机的发生,还是发生在特定的文件或者特定的时间上?另外,问题发生时是否有任何错误信息提示?Shortcut.exe的版本?是否确定问题发生时目标程序确实存在?
※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得!
论坛跳转: