原本這應是用OLE的方式來做,但可用以下的方式來做,前題是有vb所提供的vb5stkit.dll所以令人 不太愉快
Private Declare Function fCreateShellLink Lib "vb5stkit.dll" _
(ByVal Forder As String, ByVal ShortCutName As String, _
ByVal ExePath As String, ByVal Params As String) As Long
Dim ret As Long
'放在DeskTop
ret = fCreateShellLink("..\..\Desktop", "MyName", "c:\tools\spe3 \pe2.exe", "")
'放在開始功能表
ret = fCreateShellLink("..", "MyName", "c:\tools\spe3 \pe2.exe", "")
'放在程式集功能表
ret = fCreateShellLink(".", "MyName", "c:\tools\spe3 \pe2.exe", "")