680
社区成员
发帖
与我相关
我的任务
分享
OLEObject lole_WshShell,lole_ShellLink
Integer li_rc
lole_WshShell = CREATE OLEObject
li_rc = lole_WshShell.ConnectToNewObject("WScript.Shell")
IF li_rc < 0 THEN
DESTROY lole_WshShell
MessageBox("连接OLE失败", "错误代号: " + String(li_rc))
Return
END IF
lole_ShellLink = lole_WshShell.CreateShortcut("D:\QQ.lnk")//快捷方式文件名称
lole_ShellLink.TargetPath = "C:\Program Files (x86)\Tencent\QQ\Bin\QQScLauncher.exe"//目标文件
lole_ShellLink.WindowStyle = 1
lole_ShellLink.Description = "QQ"//快捷方式描述
lole_ShellLink.WorkingDirectory = "C:\Program Files (x86)\Tencent\QQ\Bin\"//工作路径
lole_ShellLink.Save//保存快捷方式
destroy lole_ShellLink
DESTROY lole_WshShell