- Dim wsh,objLnk,strLnkPath,strLnkName
-
- '下面是快捷方式的名字(含后缀lnk)
- strLnkName = "Foxmail.lnk"
-
- Set wsh = CreateObject("WScript.Shell")
- strLnkPath = wsh.SpecialFolders("Desktop") & "\" & strLnkName
-
- Set objLnk = wsh.CreateShortcut(strLnkPath)
- objLnk.WorkingDirectory = wsh.CurrentDirectory
- objLnk.Save
-
- MsgBox "Succeed."
-
- Set wsh = Nothing
- Set objLnk = Nothing
复制代码
|