废话不多了、直接上原脚本:
@echo off
set shortCutPath=D:\Program Filesset shortCutName=you_dao
set StartPath=D:\Program Files\YoudaoDict
set shortCutSource=D:\Program Files\YoudaoDict\YodaoDict.exe
md "%shortCutSource%"
md "%StartPath%"
echo Dim WshShell,Shortcut>>tmp.vbs
echo Dim path,path1,fso>>tmp.vbs
echo path="%shortCutSource%">>tmp.vbs
echo path1="%StartPath%">>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%\%shortCutName%.lnk")>>tmp.vbs
echo Shortcut.TargetPath=path>>tmp.vbs
echo Shortcut.WorkingDirectory=path1>>tmp.vbs
echo Shortcut.Save>>tmp.vbs
"%SystemRoot%\System32\WScript.exe" tmp.vbs
@del /f /s /q tmp.vbs
废话基本没有了。解释这个脚本:
CreateObject("WScript.Shell") '设置CreateObject 方法
TargetPath = " " 快捷方式里的“目标”
WindowStyle = 1 '快捷方式里的“运行方式”
Hotkey = "Ctrl+Alt+e" '快捷方式里的“快捷键”
IconLocation = "d:\qq\qq.exe, 0" '快捷方式的图标
Description = "腾讯QQ" '快捷方式里的“备注”
WorkingDirectory = "d:\qq" '快捷方式里的“起始位置”
Save '建立快捷方式
楚林陪同扯淡版(83704429) 01:08:48