|
tr0217
初级用户
 
积分 40
发帖 23
注册 2008-11-6
状态 离线
|
   『楼 主』:
批处理创建快捷方式的四种方法
使用 LLM 解释/回答一下
方法一,url式的快捷方式
echo [InternetShortcut] >>"%USERPROFILE%\桌面\画图.url"
echo URL="%SystemRoot%\system32\mspaint.exe" >>"%USERPROFILE%\桌面\画图.url"
echo IconIndex=0 >>"%USERPROFILE%\桌面\画图.url"
echo IconFile="%SystemRoot%\system32\mspaint.exe" >>"%USERPROFILE%\桌面\画图.url"
这种方式在大多数电脑上,会出现无法创建文件关联的提示,然后什么作用也起不了。
希望高手给补充一下为快捷方式添加说明的代码
方法二,外部命令
shortcut.exe /f:"%USERPROFILE%\桌面\画图.lnk" /a:c /t:"%SystemRoot%\system32\mspaint.exe"
shutcut可以在本论坛上下载,同样希望高手给补充一下为快捷方式添加说明的代码
方法三,VBScript脚本
@echo
set shortCutPath="%USERPROFILE%\桌面\画图.lnk"
echo Dim WshShell,Shortcut>>tmp.vbs
echo Dim path,fso>>tmp.vbs
echo path="%SystemRoot%\system32\mspaint.exe">>tmp.vbs
echo Set fso=CreateObject("Scripting.FileSystemObject")>>tmp.vbs
echo Set WshShell=WScript.CreateObject("WScript.Shell")>>tmp.vbs
echo Set Shortcut=WshShell.CreateShortCut(%shortCutPath%)>>tmp.vbs
echo Shortcut.TargetPath=path>>tmp.vbs
echo Shortcut.Save>>tmp.vbs
"%SystemRoot%\System32\WScript.exe" tmp.vbs
@del /f /s /q tmp.vbs
pause
这种方法也希望高手给补充一下为快捷方式添加说明的代码
方法四,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.*
这种方法最后两句看不太懂,希望高手给解释解释
热键和数值的对应关系
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
Method 1, URL-style shortcut
echo >>"%USERPROFILE%\Desktop\Paint.url"
echo URL="%SystemRoot%\system32\mspaint.exe" >>"%USERPROFILE%\Desktop\Paint.url"
echo IconIndex=0 >>"%USERPROFILE%\Desktop\Paint.url"
echo IconFile="%SystemRoot%\system32\mspaint.exe" >>"%USERPROFILE%\Desktop\Paint.url"
This method will, on most computers, present a prompt that it can't create file associations and end up doing nothing.
Hope experts can add code to add a description to the shortcut
Method 2, external command
shortcut.exe /f:"%USERPROFILE%\Desktop\Paint.lnk" /a:c /t:"%SystemRoot%\system32\mspaint.exe"
shutcut can be downloaded on this forum. Also hope experts can add code to add a description to the shortcut
Method 3, VBScript script
@echo
set shortCutPath="%USERPROFILE%\Desktop\Paint.lnk"
echo Dim WshShell,Shortcut>>tmp.vbs
echo Dim path,fso>>tmp.vbs
echo path="%SystemRoot%\system32\mspaint.exe">>tmp.vbs
echo Set fso=CreateObject("Scripting.FileSystemObject")>>tmp.vbs
echo Set WshShell=WScript.CreateObject("WScript.Shell")>>tmp.vbs
echo Set Shortcut=WshShell.CreateShortCut(%shortCutPath%)>>tmp.vbs
echo Shortcut.TargetPath=path>>tmp.vbs
echo Shortcut.Save>>tmp.vbs
"%SystemRoot%\System32\WScript.exe" tmp.vbs
@del /f /s /q tmp.vbs
pause
This method also hopes experts can add code to add a description to the shortcut
Method 4, 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.*
I don't quite understand the last two sentences of this method. Hope to get an explanation
Correspondence between hotkeys and values
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
|
|
2008-11-12 16:26 |
|
|
tireless
银牌会员
    
积分 2025
发帖 1122
注册 2007-9-5
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
.url 快捷方式好像不能设置“描述”。
the url format
http://www.moon-soft.com/program/FORMAT/internet/url.htm
————————————————————————————————————————
shortcut.exe /?
————————————————————————————————————————
方法四,winrar
... ...
start /wait test.exe
del test.*
这种方法最后两句看不太懂,希望高手给解释解释
这两句?
C:\>start /?
启动另一个窗口运行指定的程序或命令。
START
"title" 在窗口标题栏中显示的标题。
path 起始目录
B 在不创建新窗口的情况下开始应用程序。 除非
启动 ^C 处理,否则该应用程序会忽略 ^C 处理;
^Break 是唯一可以中断该应用程序的方式
I 新环境是传递给 cmd.exe 的原始环境,
而不是当前环境
MIN 开始时窗口最小化
MAX 开始时窗口最大化
SEPARATE 在分开的空间内开始 16 位 Windows 程序
SHARED 在分共享的空间内开始 16 位 Windows 程序
LOW 在 IDLE 优先级类别开始应用程序
NORMAL 在 NORMAL 优先级类别开始应用程序
HIGH 在 HIGH 优先级类别开始应用程序
REALTIME 在 REALTIME 优先级类别开始应用程序
ABOVENORMAL 在 ABOVENORMAL 优先级类别开始应用程序
BELOWNORMAL 在 BELOWNORMAL 优先级类别开始应用程序
WAIT 启动应用程序并等候它结束
del test.* —— 删除所有文件名是 test 的文件。
The .url shortcut doesn't seem to be able to set "description".
the url format
http://www.moon-soft.com/program/FORMAT/internet/url.htm
————————————————————————————————————————
shortcut.exe /?
————————————————————————————————————————
Method four, winrar
... ...
start /wait test.exe
del test.*
I don't quite understand these last two sentences, hope experts can explain
These two sentences?
C:\>start /?
Start another window to run the specified program or command.
START
"title" The title displayed in the window title bar
path Start directory
B Start the application without creating a new window. Unless
Start ^C processing, otherwise the application will ignore ^C processing;
^Break is the only way to interrupt the application
I The new environment is the original environment passed to cmd.exe,
rather than the current environment
MIN Start the window minimized at the beginning
MAX Start the window maximized at the beginning
SEPARATE Start 16-bit Windows programs in separate spaces
SHARED Start 16-bit Windows programs in shared spaces
LOW Start the application in IDLE priority category
NORMAL Start the application in NORMAL priority category
HIGH Start the application in HIGH priority category
REALTIME Start the application in REALTIME priority category
ABOVENORMAL Start the application in ABOVENORMAL priority category
BELOWNORMAL Start the application in BELOWNORMAL priority category
WAIT Start the application and wait for it to end
del test.* -- Delete all files with the filename test.
|
|
2008-11-12 22:08 |
|
|
slore
铂金会员
      
积分 5212
发帖 2478
注册 2007-2-8
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
VBS...
Shortcut.Description ="我是一个快捷方式"
VBS...
Shortcut.Description = "I am a shortcut"
|

S smile 微笑,L love 爱,O optimism 乐观,R relax 放松,E enthusiasm 热情...Slore |
|
2008-11-12 22:29 |
|
|
langzi900
新手上路

积分 8
发帖 8
注册 2008-6-21
状态 离线
|
|
2008-11-12 23:00 |
|
|
tr0217
初级用户
 
积分 40
发帖 23
注册 2008-11-6
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
方法四,winrar
... ...
start /wait test.exe
del test.*
这种方法最后两句看不太懂,希望高手给解释解释
这两句?
我说错了,是倒数第二三句。要是能把倒数第三句解释一下就好了
Method 4, winrar
... ...
start /wait test.exe
del test.*
I don't quite understand the last two sentences, hope a master can explain
These two sentences?
I made a mistake, it's the last two or three sentences. It would be nice if you could explain the third last sentence
|
|
2008-11-17 12:56 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
『第 6 楼』:
Re 5楼
使用 LLM 解释/回答一下
先把 rar.exe 的帮助文档看几遍,遇到具体问题再问。
First, read the help documentation of rar.exe several times, and ask questions when encountering specific problems.
|

 |
|
2008-11-17 13:23 |
|
|
hhasee
初级用户
 
积分 185
发帖 88
注册 2008-5-12
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
太棒了,谢谢楼主,帮了我大忙了!
Great! Thank you, the thread starter, you've been a great help to me!
|
|
2009-2-2 15:26 |
|
|
samliu
新手上路

积分 15
发帖 15
注册 2009-1-24
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
一直想找 用命令创建快捷方式的方法
终于看到了 还是好多种
谢谢 楼主 学习了
Have been wanting to find the method of creating shortcuts using commands. Finally saw it, and there are still many kinds. Thanks,楼主. Learned it.
|
|
2009-2-5 21:52 |
|
|
raythunder
初级用户
 
积分 47
发帖 30
注册 2007-12-18
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
外部工具,还有一个很好用的,就是PE系统里常用的.PECMD.exe
直接双击可以打开它的帮忙.按提示可在命令行生成快捷方式.
There is also a very useful external tool, which is the commonly used .PECMD.exe in the PE system. Double-click it directly to open its help. Follow the prompts to generate a shortcut in the command line.
|
|
2009-2-9 15:13 |
|