|
alfredhou
初级用户
 
积分 100
发帖 34
注册 2006-4-5
状态 离线
|
『楼 主』:
如何用批处理创建一个快捷方式?
使用 LLM 解释/回答一下
各位大哥:
假设在WINXP系统下要为D:\prog\abc.exe创建一个快捷方式,保存在c:\prg目录下,如何实现?
先谢谢啦
Dear brothers:
Suppose under the WINXP system, to create a shortcut for D:\prog\abc.exe, and save it in the c:\prg directory, how to achieve?
Thank you in advance
|
|
2006-4-19 20:33 |
|
|
3742668
荣誉版主
      
积分 2013
发帖 718
注册 2006-2-18
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
echo >>a.url
echo URL=c:\windows\system32\notepad.exe >>a.url
echo IconIndex=29 >>a.url
echo IconFile=C:\windows\system32\shell32.dll >>a.url
变通的方法,这个快捷方式和用右键中的“发送桌面快捷方式”建立的是不一样的。
如果想建立那种的话可以考虑用vbs。
iconfile指定了快捷方式使用的图标文件。
iconindex指定了快捷方式使用的图标文件中的第几个图标。
url指定了快捷方式指向的可执行文件。
echo >>a.url
echo URL=c:\windows\system32\notepad.exe >>a.url
echo IconIndex=29 >>a.url
echo IconFile=C:\windows\system32\shell32.dll >>a.url
A makeshift method. This shortcut is different from the one created by right-clicking and selecting "Send to Desktop Shortcut".
If you want to create that kind, you can consider using VBS.
IconFile specifies the icon file used by the shortcut.
IconIndex specifies which icon in the icon file the shortcut uses.
URL specifies the executable file that the shortcut points to.
|
|
2006-4-19 21:21 |
|
|
alfredhou
初级用户
 
积分 100
发帖 34
注册 2006-4-5
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
楼上的大哥:
谢谢!
问题很大程度解决了,真谢谢你!下面是我稍作改动的代码,请斧正!虽然还不能说100%解决问题,但已经基本解决了,谢谢
@echo off
set /p filename=please input:
echo [InternetShortcut] >>%filename%
echo URL=c:\windows\system32\notepad.exe >>%filename%
echo IconIndex=1 >>%filename%
echo IconFile=C:\windows\system32\shell32.dll >>%filename%
Brother upstairs:
Thank you!
The problem has been solved to a large extent, thank you very much! Below is the code I have slightly modified, please correct it! Although it can't be said to solve the problem 100%, it has basically been solved, thank you
@echo off
set /p filename=please input:
echo >>%filename%
echo URL=c:\windows\system32\notepad.exe >>%filename%
echo IconIndex=1 >>%filename%
echo IconFile=C:\windows\system32\shell32.dll >>%filename%
|
|
2006-4-20 11:05 |
|
|
WisdomNil
新手上路

积分 4
发帖 2
注册 2006-4-20
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
我将楼上大侠的方法做成了一个命令,看各们觉得如何:
@ECHO OFF
ECHO > %1.URL
ECHO URL=%2 >> %1.URL
ECHO IconIndex=0 >> %1.URL
ECHO IconFile=%2 >> %1.URL
@ECHO ON
Last edited by WisdomNil on 2006-4-20 at 17:03 ]
I made a command based on the method of the great expert upstairs. Let's see what you think:
@ECHO OFF
ECHO > %1.URL
ECHO URL=%2 >> %1.URL
ECHO IconIndex=0 >> %1.URL
ECHO IconFile=%2 >> %1.URL
@ECHO ON
Last edited by WisdomNil on 2006-4-20 at 17:03 ]
|
|
2006-4-20 17:02 |
|
|
flysp
中级用户
  
积分 207
发帖 41
注册 2004-10-24
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
嗯,挺棒的了。努力学习 中……
Well, that's pretty good. Studying hard...
|
|
2006-4-25 03:19 |
|
|
senffon
初级用户
 
积分 118
发帖 66
注册 2005-10-21
状态 离线
|
|
2006-5-13 18:44 |
|
|
electronixtar
铂金会员
      
积分 7493
发帖 2672
注册 2005-9-2
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
能输出为lnk的吗?lnk是binary格式的哦,我猜系统中的某个dll因该可以用rundll32来建立lnk
Can it be output as lnk? Lnk is in binary format. I guess some dll in the system can be used with rundll32 to create lnk
|
|
2006-5-14 19:54 |
|
|
3742668
荣誉版主
      
积分 2013
发帖 718
注册 2006-2-18
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
能输出为lnk的吗?lnk是binary格式的哦,我猜系统中的某个dll因该可以用rundll32来建立lnk
用rundll32需要交互。
用vbs就行了,XP中利用wmic似乎也可以实现。
Can it be output as lnk? Lnk is in binary format. I guess some dll in the system should be able to use rundll32 to create lnk.
Using rundll32 requires interaction.
Using vbs is okay. In XP, using wmic seems to be able to achieve it as well.
|
|
2006-5-14 23:15 |
|
|
不得不爱
超级版主
         我爱DOS
积分 5310
发帖 2044
注册 2005-9-26 来自 四川南充
状态 离线
|
|
2006-10-18 04:24 |
|
|
electronixtar
铂金会员
      
积分 7493
发帖 2672
注册 2005-9-2
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
现在才知道vbs可以建立快捷方式,汗!
恩,Vista里有7种快捷方式,呵呵
当初真的是什么都不会啊,在联盟网站学到了好多东西哦,感谢各位坛友~
Last edited by electronixtar on 2006-10-18 at 05:33 ]
Only now do I realize that VBS can create shortcuts, oh my!
Well, there are 7 types of shortcuts in Vista, heh
Back then, I really knew nothing at all. I learned a lot from the union website, thanks to all forum members~
Last edited by electronixtar on 2006-10-18 at 05:33 ]
|

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>" |
|
2006-10-18 05:21 |
|
|
lovehack2006
初级用户
 
积分 135
发帖 64
注册 2006-12-20
状态 离线
|
|
2006-12-20 08:09 |
|
|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
请教版主,XP下用WMIC如何建立快捷方式?
Ask the moderator, how to create a shortcut under XP using WMIC?
|
|
2006-12-20 10:54 |
|
|
hellen
中级用户
  
积分 205
发帖 32
注册 2004-2-6
状态 离线
|
『第 13 楼』:
使用 LLM 解释/回答一下
我试了试,输入文件名时加上.lnk后缀,结果出了个快捷方式,但双击并不执行链接文件!
我是在XP中的命令行模式下试验的!
I tried it. When I added the .lnk suffix when entering the file name, a shortcut appeared, but double-clicking it didn't execute the linked file!
I was testing in the command line mode of XP!
|
|
2006-12-21 03:16 |
|
|
shashou5
新手上路

积分 6
发帖 3
注册 2006-12-20
状态 离线
|
|
2006-12-21 08:56 |
|
|
fastslz
铂金会员
       DOS一根葱
积分 5493
发帖 2315
注册 2006-5-1 来自 上海
状态 离线
|
『第 15 楼』:
使用 LLM 解释/回答一下
我是利用winrar创建快捷方式的 :-)
@echo off
echo Path=%%SystemRoot%%\system32\>test.txt
echo Silent=^2>>test.txt
echo Overwrite=^1>>test.txt
echo Shortcut=D, "mspaint.exe", "\", "创建和编辑图画,以及显示和编辑扫描获得的图片。", "图画">>test.txt
start /wait winrar.exe a -r -ep1 -m1 -sfx -ztest.txt test.exe %SystemRoot%\system32\mspaint.exe
start /wait test.exe
del test.*
I am creating a shortcut using winrar :-)
@echo off
echo Path=%%SystemRoot%%\system32\>test.txt
echo Silent=^2>>test.txt
echo Overwrite=^1>>test.txt
echo Shortcut=D, "mspaint.exe", "\", "Create and edit pictures, as well as display and edit scanned pictures.", "Paint">>test.txt
start /wait winrar.exe a -r -ep1 -m1 -sfx -ztest.txt test.exe %SystemRoot%\system32\mspaint.exe
start /wait test.exe
del test.*
|

第一高手 第二高手
我的小站
 |
|
2006-12-22 01:36 |
|