![]() |
中国DOS联盟-- 联合DOS 推动DOS 发展DOS --联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum |
| 游客 | 登录 | 注册 | 会员 | 搜索 | 中国DOS联盟 |
|
中国DOS联盟论坛 现在时间是 2026-08-05 07:59 |
共 48,038 主题排行 / 350,123 发帖 / 今日 0 篇 / 48,251 会员排行 |
| DOS批处理 & 脚本技术(批处理室) » 怎样利用bat文件在收藏夹中创建快捷方式 |
| 可打印版本 940 / 1 |
| 第1楼 59fei | 发表于 2007-07-09 13:53 |
| 初级用户 发帖 23 积分 60 | |
|
怎样利用bat文件在收藏夹中创建快捷方式 如题:
下面是在桌面创建快捷方式的方法: 请问怎么在收藏夹中创建快捷方式呢 cd.>tmp.vbs for /f "usebackq skip=4 tokens=*" %%a in (%0) do @echo %%a>>tmp.vbs tmp.vbs&del tmp.vbs /q goto :eof Rem 以下为VbScript脚本 Set WshShell = WScript.CreateObject("WScript.Shell") strDesktop = WshShell.SpecialFolders("Desktop") :'特殊文件夹“桌面” Rem 在桌面创建一个记事本快捷方式 set oShellLink = WshShell.CreateShortcut(strDesktop & "\记事本.lnk") oShellLink.TargetPath = "notepad.exe" : '目标 oShellLink.WindowStyle = 3 :'参数1默认窗口激活,参数3最大化激活,参数7最小化 oShellLink.Hotkey = "Ctrl+Alt+e" : '快捷键 oShellLink.IconLocation = "notepad.exe, 0" : '图标 oShellLink.Description = "记事本快捷方式" : '备注 oShellLink.WorkingDirectory = strDesktop : '起始位置 oShellLink.Save : '创建保存快捷方式 Rem 在桌面创建一个“微软中国”的Url快捷方式 set oUrlLink = WshShell.CreateShortcut(strDesktop & "\微软中国.url") oUrlLink.TargetPath = "http://www.microsoft.com/china" oUrlLink.Save |
|
| 第2楼 59fei | 发表于 2007-07-09 13:56 |
| 初级用户 发帖 23 积分 60 | |
|
我找到答案了 Desktop 直接换成 收藏夹文件名就行了
可是无论怎样 老是报错 [ Last edited by 59fei on 2007-7-9 at 02:12 PM ] |
|
|
[ 联系联盟系统管理团队 -
中国DOS联盟 -
标准版 ] Sponsored by ifanr Inc | © 2001–2023 |