生成应用程序快捷方式的命令shortcut.exe
附了用右键创建快捷方式外,还可以用命令创建快捷方式,但需要用到下面的小程序。
ShortCut
语法规则: shortcut AppFile [/a Arguments] [/h HotKey] [/s ShowCmd] [/d Description]
语法规则: shortcut AppFile [/a Arguments] [/h HotKey] [/s ShowCmd] [/d Description]
[/i IconPath,IconIndex] [/l|/ld|/ll|/ls LinkFile]
AppFile 你希望创建快捷方式的文件名。 /a 可选参数—用于执行文件名的额外辅助参数。 /h 可选参数—指定某快捷方式热键 [ctrl+alt+shift+f1]。 /s 可选参数—用于设置程序窗口的显示方式 [默认:常规1,最小化2,最大化3]。 /d 可选参数—为快捷方式定义描述(或备注)。 /i 可选参数—创建快捷方式的图标文件与图标索引。 /l 你希望创建快捷方式的全文件名。 /ld 表示快捷方式路径默认为桌面。 /ll 表示快捷方式路径默认为启动栏。 /ls 表示快捷方式路径默认为开始菜单。
注意事项: 如果目录中有空格,应该在目录前后加引号。 比如:E:\Program Files\starcraft\starcraft.exe 应该写成:E:\>shortcut "E:\Program Files\starcraft\starcraft.exe" /ld sc.lnk 另请注意:程序默认的桌面是在:C:\Documents and Settings\userid\桌面,如果更改了桌面的位置,可能在桌面上看不到快捷方式。
注意事项: 如果目录中有空格,应该在目录前后加引号。 比如:E:\Program Files\starcraft\starcraft.exe 应该写成:E:\>shortcut "E:\Program Files\starcraft\starcraft.exe" /ld sc.lnk 另请注意:程序默认的桌面是在:C:\Documents and Settings\userid\桌面,如果更改了桌面的位置,可能在桌面上看不到快捷方式。
程序示范: shortcut D:\Tencent\QQ\Bin\QQ.exe /h ctrl+shift+alt+f4 /ld c.lnk shortcut D:\Tencent\QQ\Bin\QQ.exe /d hello /ld c.lnk shortcut D:\Tencent\QQ\Bin\QQ.exe /s 2 /ld c.lnk shortcut D:\Tencent\QQ\Bin\QQ.exe /a -win /ld c.lnk shortcut D:\Tencent\QQ\Bin\QQ.exe /i C:\WINDOWS\system32\shell32.dll,13 /ld c.lnk shortcut D:\Tencent\QQ\Bin\QQ.exe /a -win /d QQ /s 3 /h ctrl+F5 /i C:\WINDOWS\system32\shell32.dll,13 /ld c.lnk
另一版本的shortcut
SHORTCUT shortcut: [-? -h -f -c -r -s] [[-t] target [[-n] name]] [-d working directory] [-a Arguments] [-i Iconfile] [-x Icon index] [-u {all|[natdix]}] [-l logfile]
另一版本的shortcut
-? -h This help -f Force overwrite of an existing short cut -c Change existing shortcut -s Make shortcut non tracking (Stupid) -r Resolve broken shortcut -t target Specifies the target of the shortcut -n name Specifies the file name of the shortcut file -d directory Specifies the directory name to start the application in -a arguments Specifies the arguments passed when the shortcut is used -i iconfile Specifiles the file the icon is in -x index Specifies the index into the icon file -u [spec] Dumps the contents of a shortcut. 'all' is the same as 'natdix' but the letters of 'natdix' can be specified to display specific fields in the shortcut (repeats allowed, and order followed) -l logfile record error messages in specified file
浙公网安备 33010602011771号