技术问题用google搜索会比较好 ^_^
下面是bat批处理内容(不包括分割线)
----------------------------------------------------------
@echo off
C:
cd "C:\Documents and Settings\用户名\Desktop"
echo [InternetShortcut] >>QQ.url
echo URL="D:\QQ.exe" >>QQ.url
echo IconIndex=0 >>QQ.url
echo IconFile="D:\QQ.exe" >>QQ.url
----------------------------------------------------------
将其中“用户名”改为你实际的用户名。
测试通过。
附注:
The IconIndex and IconFile fields let you specify the icon for the .url shortcut. The IconFile could point to your application's exe file (IconIndex is the index of the icon as a resource inside the exe).
一个典型的url文件内容格式如下:
[InternetShortcut]
URL=
http://delphi.about.com IconIndex=0
IconFile=C:\MyFolder\MyDelphiProgram.exe
只要用CMD echo命令按这个形式写url文件即可。
参考资料:http://wenwen.soso.com/z/q169900847.htm