中国DOS联盟

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

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

中国DOS联盟论坛
现在时间是 2026-08-09 20:02
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » 创建快捷方式出了问题 查看 1,017 回复 10
楼 主 创建快捷方式出了问题 发表于 2008-09-03 20:10 ·  中国 湖北 武汉 电信
初级用户
积分 20
发帖 7
注册 2008-08-29 00:59
17年会员
UID 124446
性别 男
状态 离线
我现在遇到这个问题,我上次问的问题时复制快捷方式,我后搞到了,但我又发现这个快捷方式到了别人的电脑上就不起效了,那我现在就得用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 发表于 2008-09-03 21:52 ·  中国 重庆 巫山县 电信
版主
★★★★★
积分 9,023
发帖 5,017
注册 2007-05-31 19:39
19年会员
UID 89899
性别 男
状态 离线
>>>
这个符号是啥意思?
3 发表于 2008-09-03 22:00 ·  中国 重庆 巫山县 电信
版主
★★★★★
积分 9,023
发帖 5,017
注册 2007-05-31 19:39
19年会员
UID 89899
性别 男
状态 离线
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 回复 发表于 2008-09-04 08:37 ·  中国 湖北 武汉 电信
初级用户
积分 20
发帖 7
注册 2008-08-29 00:59
17年会员
UID 124446
性别 男
状态 离线
哦 那个啊,和>>是一个效果,我在百度里找的时候后来吧两个的给换成三个的,结果都一样,后来就没有改过来 你的第二个回复看不懂啊 大哥 救啊 ,
5 回复 发表于 2008-09-04 08:42 ·  中国 湖北 武汉 电信
初级用户
积分 20
发帖 7
注册 2008-08-29 00:59
17年会员
UID 124446
性别 男
状态 离线
你发给我的那个EXE时怎么用的啊,没有用BAT做的吗,我的那个BAT代码有什么问题可以说说吗,或你可以有别的代码教教我好吗,大哥 我最近在等着上传我一个做的东西----劲舞团单机,o(∩_∩)o...
6 发表于 2008-09-04 09:40 ·  新加坡
版主
★★★★★
积分 9,023
发帖 5,017
注册 2007-05-31 19:39
19年会员
UID 89899
性别 男
状态 离线
>>>和>>是一个效果?你用的什么系统?
7 回复 发表于 2008-09-04 10:49 ·  中国 湖北 武汉 电信
初级用户
积分 20
发帖 7
注册 2008-08-29 00:59
17年会员
UID 124446
性别 男
状态 离线
是我说错了吧 ,我时XP的 o(∩_∩)o... 反正后来就时出现的结果好像都时一样的吧,我试了好几次,后来就没有改过来,所以就那样了 ,我的问题可以解决的吗 大哥 帮帮我 啊......
8 发表于 2008-09-04 19:20 ·  中国 广东 梅州 电信
中级用户
★★
积分 262
发帖 129
注册 2007-07-11 06:50
19年会员
UID 93679
性别 男
状态 离线
3楼大哥,麻烦翻译一下,就别折腾人了~~
9 发表于 2008-09-18 23:08 ·  中国 广东 广州 电信
银牌会员
★★★
永远的菜鸟
积分 1,335
发帖 574
注册 2007-11-27 12:50
18年会员
UID 103929
性别 男
来自 广西
状态 离线
为什么用shortcut的代码1可以使用qq的图标,而代码2却不能呢,望指教!!!
代码1:
@echo off
shortcut /f:"%userprofile%\桌面\qq.lnk" /a:c /t:"f:\test\test.bat"
/i:"d:\program files\tencent\qq\qq.exe"

代码2:
@echo off
>"%userprofile%\桌面\qq.url" echo
>>"%userprofile%\桌面\qq.url" echo url="d:\temp\a.bat"
>>"%userprofile%\桌面\qq.url" echo IconFile="d:\program files\tencent\qq\qq.exe"
10 re 9 楼 发表于 2008-09-19 11:12 ·  中国 江西 赣州 安远县 电信
银牌会员
★★★★
积分 2,025
发帖 1,122
注册 2007-09-05 20:15
18年会员
UID 96653
性别 男
状态 离线
代码2 少了一行:

>>"%userprofile%\桌面\qq.url" echo IconIndex=0
本帖最近评分记录 (共 1 条) 点击查看详情
评分人分数时间
moniuming +8 2008-09-19 11:22
11 发表于 2008-09-19 11:26 ·  中国 广东 广州 电信
银牌会员
★★★
永远的菜鸟
积分 1,335
发帖 574
注册 2007-11-27 12:50
18年会员
UID 103929
性别 男
来自 广西
状态 离线
非常感谢,成功了,其实在我的试验中,我是在文件夹中创建这个快捷方式的,所以不成功,只有在桌面创建才行,而shortcut可以在文件夹中创建,毕竟是专业的,呵呵...
论坛跳转: