![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-09-24 00:27 |
47,812 topics / 349,917 posts / today 0 new / 48,274 members |
| DOS批处理 & 脚本技术(批处理室) » How to create a shortcut using batch processing? |
| Printable Version 6,585 / 16 |
| Floor1 alfredhou | Posted 2006-04-19 20:33 |
| 初级用户 Posts 34 Credits 100 | |
|
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 |
|
| Floor2 3742668 | Posted 2006-04-19 21:21 |
| 荣誉版主 Posts 718 Credits 2,013 | |
|
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. |
|
| Floor3 alfredhou | Posted 2006-04-20 11:05 |
| 初级用户 Posts 34 Credits 100 | |
|
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 [InternetShortcut] >>%filename% echo URL=c:\windows\system32\notepad.exe >>%filename% echo IconIndex=1 >>%filename% echo IconFile=C:\windows\system32\shell32.dll >>%filename% |
|
| Floor4 WisdomNil | Posted 2006-04-20 17:02 |
| 新手上路 Posts 2 Credits 4 | |
|
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 ] |
|
| Floor5 flysp | Posted 2006-04-25 03:19 |
| 中级用户 Posts 41 Credits 207 | |
|
Well, that's pretty good. Studying hard...
|
|
| Floor6 senffon | Posted 2006-05-13 18:44 |
| 初级用户 Posts 66 Credits 118 | |
| Floor7 electronixtar | Posted 2006-05-14 19:54 |
| 铂金会员 Posts 2,672 Credits 7,493 | |
|
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
|
|
| Floor8 3742668 | Posted 2006-05-14 23:15 |
| 荣誉版主 Posts 718 Credits 2,013 | |
Using rundll32 requires interaction. Using vbs is okay. In XP, using wmic seems to be able to achieve it as well. |
|
| Floor9 不得不爱 | Posted 2006-10-18 04:24 |
| 超级版主 Posts 2,044 Credits 5,310 From 四川南充 | |
|
Why can't I implement this shortcut function in Windows 2000? After setting it up, clicking this shortcut requires me to establish a file association!
|
|
| Floor10 electronixtar | Posted 2006-10-18 05:21 |
| 铂金会员 Posts 2,672 Credits 7,493 | |
|
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 ] |
|
| Floor11 lovehack2006 | Posted 2006-12-20 08:09 |
| 初级用户 Posts 64 Credits 135 | |
|
Everyone here are all experts!
|
|
| Floor12 lxmxn | Posted 2006-12-20 10:54 |
| 版主 Posts 4,938 Credits 11,386 | |
|
Ask the moderator, how to create a shortcut under XP using WMIC? |
|
| Floor13 hellen | Posted 2006-12-21 03:16 |
| 中级用户 Posts 32 Credits 205 | |
|
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! |
|
| Floor14 shashou5 | Posted 2006-12-21 08:56 |
| 新手上路 Posts 3 Credits 6 | |
| Floor15 fastslz | Posted 2006-12-22 01:36 |
| 铂金会员 Posts 2,315 Credits 5,493 From 上海 | |
|
I am creating a shortcut using winrar :-)
|
|
| 1 2 Next |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |