方永、南天紫云

道亦有道

shortcut,命令行创建快捷方式
2011年08月25日

shortcut

命令行生成快捷方式程序

特点:

  1. 使用汇编程序编写,fasm汇编器汇编,指令级优化,极小的体积(目前版本4.5KB),超快的速度,真正意义上的绿色软件。

  2. 开源软件,使用MIT开源协议发布,可以了解程序的每一个细节,放心地使用(可惜360之类的很多杀毒软件会报毒,汇编语言写的程序命运大都如此吧)。

  3. 较之于微软的一款命令行批处理工具,shortcut体积更小,内部实现更新,功能更为强大,命令行参数更为人性化。

用法:

命令行参数格式:

shortcut .lnk_file target_file [parameters] [icon_file icon_index][start_options] [hotkey] [description]
1. 要生成的快捷方式的文件名,包括路径
2. 目标文件或文件夹
3. 传递的参数
4. 图标文件
5. 图标索引
6. 启动方式
7. 快捷键
8. 描述

例子:

在快速启动栏(开始键右边)创建一个 C 盘的快捷方式

shortcut $quicklaunch\demo.lnk c:

在桌面创建一个 C 盘的快捷方式,用 C:\windows\explorer.exe 文件中索引为5的图标,启动方式为常规,快捷键为 Ctrl+Alt+Backspace,描述为 demo

shortcut $desktop\demo c: "" "C:\windows\explorer.exe" 5 nor "ca|8" demo

english help:

shortcut,creat a shortcut for windows shell.
 
Usage:
shortcut .lnk_file target_file [parameters] [icon_file icon_index][start_options] [hotkey] [description]
 
Examples:
shortcut $quicklaunch\demo.lnk c:
shortcut $desktop\demo c: "" "c:\windows\explorer.exe" 5 nor "ca|8"
demo
 
Following variable can be used in shortcut file name:
$desktop $quicklaunch $sendto $startmenu $smprograms $templates
 
start_options should be one of: nor max min
hotkey use "[modifier flags|]Virtual-Key Codes" format,modifier flags can be a combination of c(CONTROL key)
a(ALT key) s(SHIFT key) e(Extended key),and codes is decimal system
 
For more help,visit hi.baidu.com/bywei

下载地址:http://files.vinoca.org