中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --
联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
游客 | 登录 | 注册 | 会员 | 搜索 | 中国DOS联盟
中国DOS联盟论坛
现在时间是 2026-08-09 19:03
47,811 主题排行 / 349,896 发帖 / 今日 1 篇 / 48,254 会员排行
DOS批处理 & 脚本技术(批处理室) » 创建快捷方式出了问题
可打印版本  1,016 / 10
第1楼 ywl917 发表于 2008-09-03 20:10
初级用户 发帖 7 积分 20
创建快捷方式出了问题
我现在遇到这个问题,我上次问的问题时复制快捷方式,我后搞到了,但我又发现这个快捷方式到了别人的电脑上就不起效了,那我现在就得用BAT在当前文件夹内首先为EXE创建快捷方式了,我用的是
@echo off
echo [InternetShortcut] >"%ALLUSERSPROFILE%\桌面\劲舞团.url"
echo URL=%cd%\劲舞团.exe >>>"%ALLUSERSPROFILE%\桌面\劲舞团.url"
echo IconIndex=0 >>>"%ALLUSERSPROFILE%\桌面\劲舞团.url"
echo IconFile=%cd%\劲舞团.exe>>>"%ALLUSERSPROFILE%\桌面\劲舞团.url"
pause

但结果创建出来的EXE快捷方式双击后时打开一个网页,我不知道出了什么问题啊 帮帮忙阿
第2楼 HAT 发表于 2008-09-03 21:52
版主 发帖 5,017 积分 9,023
>>>
这个符号是啥意思?
第3楼 HAT 发表于 2008-09-03 22:00
版主 发帖 5,017 积分 9,023
shortcut.exe
http://upload.cn-dos.net/img/464.zip

C:\Test>shortcut /?


Shortcut

Creates, modifies or queries Windows shell links (shortcuts)


The syntax of this command is:

shortcut /F:filename /A:C|E|Q


/F:filename : Specifies the .LNK shortcut file.
/A:action : Defines the action to take (C=Create, E=Edit or Q=Query).
/T:target : Defines the target path and file name the shortcut points to.
/P:parameters : Defines the command-line parameters to pass to the target.
/W:working dir : Defines the working directory the target starts with.
/R:run style : Defines the window state (1=Normal, 3=Max, 7=Min).
/I:icon,index : Defines the icon and optional index (file.exe or file.exe,0).
/H:hotkey : Defines the hotkey, a numeric value of the keyboard shortcut.
/D:description : Defines the description (or comment) for the shortcut.

Notes:
- Any argument that contains spaces must be enclosed in "double quotes".
- If Query is specified (/A:Q), all arguments except /F: are ignored.
- To find the numeric hotkey value, use Explorer to set a hotkey and then /A:Q
- To prevent an environment variable from being expanded until the shortcut
is launched, use the ^ carat escape character like this: ^%WINDIR^%

Examples:
/f:"%ALLUSERSPROFILE%\Start Menu\Programs\My App.lnk" /a:q
/f:"%USERPROFILE%\Desktop\Notepad.lnk" /a:c /t:^%WINDIR^%\Notepad.exe /h:846
/f:"%USERPROFILE%\Desktop\Notepad.lnk" /a:e /p:C:\Setup.log /r:3

An argument of /? or -? displays this syntax and returns 1.
A successful completion will return 0.


Copyright 2000-2005 Marty List, www.OptimumX.com
第4楼 ywl917 发表于 2008-09-04 08:37
初级用户 发帖 7 积分 20
回复
哦 那个啊,和>>是一个效果,我在百度里找的时候后来吧两个的给换成三个的,结果都一样,后来就没有改过来 你的第二个回复看不懂啊 大哥 救啊 ,
第5楼 ywl917 发表于 2008-09-04 08:42
初级用户 发帖 7 积分 20
回复
你发给我的那个EXE时怎么用的啊,没有用BAT做的吗,我的那个BAT代码有什么问题可以说说吗,或你可以有别的代码教教我好吗,大哥 我最近在等着上传我一个做的东西----劲舞团单机,o(∩_∩)o...
第6楼 HAT 发表于 2008-09-04 09:40
版主 发帖 5,017 积分 9,023
>>>和>>是一个效果?你用的什么系统?
第7楼 ywl917 发表于 2008-09-04 10:49
初级用户 发帖 7 积分 20
回复
是我说错了吧 ,我时XP的 o(∩_∩)o... 反正后来就时出现的结果好像都时一样的吧,我试了好几次,后来就没有改过来,所以就那样了 ,我的问题可以解决的吗 大哥 帮帮我 啊......
第8楼 kidzgy 发表于 2008-09-04 19:20
中级用户 发帖 129 积分 262
3楼大哥,麻烦翻译一下,就别折腾人了~~
第9楼 moniuming 发表于 2008-09-18 23:08
银牌会员 发帖 574 积分 1,335 来自 广西
为什么用shortcut的代码1可以使用qq的图标,而代码2却不能呢,望指教!!!
代码1:

代码2:
第10楼 tireless 发表于 2008-09-19 11:12
银牌会员 发帖 1,122 积分 2,025
re 9 楼
代码2 少了一行:

>>"%userprofile%\桌面\qq.url" echo IconIndex=0
第11楼 moniuming 发表于 2008-09-19 11:26
银牌会员 发帖 574 积分 1,335 来自 广西
非常感谢,成功了,其实在我的试验中,我是在文件夹中创建这个快捷方式的,所以不成功,只有在桌面创建才行,而shortcut可以在文件夹中创建,毕竟是专业的,呵呵...
[ 联系联盟系统管理团队 - 中国DOS联盟 - 标准版 ]
Sponsored by ifanr Inc | © 2001–2023