| Shortcut [Version 1.11] |
| Shortcut [版本1.11] |
| |
| Creates, modifies or queries Windows shell links (shortcuts) |
| 创建,修改或查询快捷方式 |
| |
| The syntax of this command is: |
| 次命令的语法为: |
| shortcut /F:filename /A:C|E|Q [/T:target] [/P:parameters] [/W:workingdir] |
| [/R:runstyle] [/I:icon,index] [/H:hotkey] [/D:description] |
| |
| Shortcut [/F:文件名] [/A:C|E|Q ] [/T:目标 ] [/p:参数] [/W:运行目录] [/R:运行时窗口的显示状态] [/I:图标,图标的位置] [/H:快捷键] [/D:描述] |
| |
| /F:filename : Specifies the .LNK shortcut file. |
| /F:文件名 :指定一个.lnk快捷方式文件的绝对路径,不指则为当前的路径 |
| /A:action : Defines the action to take (C=Create, E=Edit or Q=Query). |
| /A:动作:指定某个动作(C=创建,E=编辑,Q=查询) |
| /T:target : Defines the target path and file name the shortcut points to. |
| /T:目标:指定要创建快捷方式的绝对路径和文件名 |
| /P:parameters : Defines the command-line parameters to pass to the target. |
| /p:参数:指定要目标执行的命令行参数 |
| /W:working dir : Defines the working directory the target starts with. |
| /W:运行目录:定义目标开始工作的目录 |
| /R:run style : Defines the window state (1=Normal, 3=Max, 7=Min). |
| /R:运行时窗口的显示状态:自定义窗口的运行状态(1=普通,3=最大,7=最小) |
| /I:icon,index : Defines the icon and optional index (file.exe or file.exe,0). |
| /I:图标,图标的位置:自定义快捷方式的图标和图标的位置(文件名.exe 或者 文件名.exe,0) |
| /H:hotkey : Defines the hotkey, a numeric value of the keyboard shortcut. |
| /H:快捷键:自定义一个快捷键,可以是数值或者是键盘的快捷键(例如Alt+Ctrl+Del等等) |
| /D:description : Defines the description (or comment) for the shortcut. |
| /D:描述:为快捷方式添加描述(当鼠标指向快捷方式的显示出来的气泡提示,例如:某某文件的快捷方式或者它的绝对路径) |
| Notes: |
| 注: |
| - Any argument that contains spaces must be enclosed in "double quotes". |
| -任何有空格的参数必须使用双引号“包”起来 |
| - If Query is specified (/A:Q), all arguments except /F: are ignored. |
| -如果使用/A:Q命令查询,除了参数/F:之外,所有的参数将被忽略 |
| - To find the numeric hotkey value, use Explorer to set a hotkey and then /A:Q |
| -*如果要查询一个快捷键,使用资源管理器来设定一个快捷键,然后再使用参数/A:Q查询 |
| - To prevent an environment variable from being expanded until the shortcut |
| is launched, use the ^ carat escape character like this: ^%WINDIR^% |
| -**为了避免某个环境变量在创建快捷方式运行时扩展,请使用转义字符^,例如:^%WINDIR^% |
| Examples: |
| 例子: |
| /f:"%ALLUSERSPROFILE%\Start Menu\Programs\My App.lnk" /a:q |
| /f:"%USERPROFILE%\Desktop\Notepad.lnk" /a:c /t:^%WINDIR^%\Notepad.exe /h:846 |
| /f:"%USERPROFILE%\Desktop\Notepad.lnk" /a:e /p:C:\Setup.log /r:3 |
| |
| An argument of /? or -? displays this syntax and returns 1. |
| 参数 /? 或者-? 将显示此帮助文件并返回1 |
| A successful completion will return 0. |
| 成功会返回0 |
| |
| Copyright 2000-2005 Marty List, www.OptimumX.com |
| 版权所有 2000-2005 Marty List,www.OptimumX.com |
| |
| *应该是指:如果要查询一个快捷方式的快捷键,右击那个快捷键,选择属性(Properties),然后再快捷键的框框,按想要的快捷键(例如:例子:"%USERPROFILE%\Desktop\Notepad.lnk" /a:c /t:^%WINDIR^%\Notepad.exe /h:846的快捷键是Ctrl+Shift+N),然后可以使用参数/A:Q查询 |
| |
| **因为变量在命令提示符中会被扩展,所以使用转义字符来避免。^%WINDIR^%是某个文件的绝对路径,而不是环境变量,就像 |
| |
| echo %WINDIR% > test.txt |
| test.txt中显示的是C:\Windows\ |
| 而 |
| |
| echo ^%WINDIR^% > test.txt |
| test.txt中显示的是却是%WINDIR% |
| |
| 的道理是一样的,希望看得明白~COPY |