赞
踩
其实最后还是通过vbs来创建快捷方式
思路:
思路:通过bat输出vbs代码,然后调用WScript.exe执行相关代码
@echo
set ShortcutTargetPath="%~dp0%../External/DEVENV.bat"
set ShortcutPath="C:/Documents and Settings/lanx/Desktop/TCT.lnk"
set IconLocationPath="%VS80COMNTOOLS%../IDE/devenv.exe,3"
set HotKey="CTRL+SHIFT+T"
echo Set WshShell=WScript.CreateObject("WScript.Shell") >>tmp.vbs
echo Set Shortcut=WshShell.CreateShortCut(%ShortcutPath%) >>tmp.vbs
echo Shortcut.Hotkey = %HotKey% >>tmp.vbs
echo Shortcut.IconLocation=%IconLocationPath% >>tmp.vbs
echo Shortcut.TargetPath=%ShortcutTargetPath% >>tmp.vbs
echo Shortcut.Save >>tmp.vbs
"%SystemRoot%/System32/WScript.exe" tmp.vbs
@del /f /s /q tmp.vbs
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。