Board logo

标题: [分享]巧用批处理创建快捷方式 [打印本页]

作者: clian76     时间: 2008-10-30 16:02    标题: [分享]巧用批处理创建快捷方式

我经常用的方法,很不错的。是以前在网上学的。注意要ATTRIB +R不然有时它会自动改地址的。HOTKEY是快捷键代码,例中的118指向F7键。
::创建快捷方式

if not exist "%USERPROFILE%\桌面\体彩排列5.url" (

>"%USERPROFILE%\桌面\体彩排列5.url" echo [InternetShortcut]

>>"%USERPROFILE%\桌面\体彩排列5.url" echo URL="%cd%\%outna%"

>>"%USERPROFILE%\桌面\体彩排列5.url" echo IconIndex=166

>>"%USERPROFILE%\桌面\体彩排列5.url" echo IconFile=%windir%\system32\SHELL32.dll

>>"%USERPROFILE%\桌面\体彩排列5.url" echo Modified=F00BA4B792A0C80151

>>"%USERPROFILE%\桌面\体彩排列5.url" echo Hotkey=118

attrib +r "%USERPROFILE%\桌面\体彩排列5.url"

)
[ Last edited by clian76 on 2008-10-30 at 16:03 ]

作者: tireless     时间: 2008-10-30 16:12    标题: the url format

the url file format looks pretty simple, it has the same format as a ini file: ----------------------------------------- [internetshortcut] url=http://www.someaddress.com/ workingdirectory=c:\windows\ showcommand=7 iconindex=1 iconfile=c:\windows\system\url.dll modified=20f06ba06d07bd014d hotkey=1601 ----------------------------------------- url is self-explanatory workingdirectory is self-explanatory iconindex is: the icon index within iconfile iconfile is: a file containing a icon showcommand is: (nothing) - normal 7 - minimized 3 - maximized hotkey is: 833 - ctrl + shift + a 834 - ctrl + shift + b 835 - ctrl + shift + c 836 - ctrl + shift + d 837 - ctrl + shift + e 838 - ctrl + shift + f . . 1601 - ctrl + alt + a 1602 - ctrl + alt + b 1603 - ctrl + alt + c 1604 - ctrl + alt + d 1605 - ctrl + alt + e 1606 - ctrl + alt + f . . .

作者: pigpigs     时间: 2008-11-11 17:41
好东西 呀学习下

作者: yishanju     时间: 2008-11-11 18:50
系统lnk后缀的文件才叫快捷方式好吗? 能把名字改建立Internet 快捷方式不

作者: clian76     时间: 2008-11-11 20:31
Internet 快捷方式 不是快捷方式吗

作者: 77720666     时间: 2008-11-11 22:53
虽然是 Internet 快捷方式 但还不错的~