建立快捷方式
Private Declare Function fCreateShellLink Lib "vb5stkit.DLL" (ByVal _
lpstrFolderName As String, ByVal lpstrLinkName As String, ByVal _
lpstrLinkPath As String, ByVal lpstrLinkArgs As String) As Long
Private Sub MakeShortCuts()
Dim lReturn As Long
Dim MyPath As String
Dim MyName As String
MyPath = App.Path
MyName = App.EXEName
'增加到桌面
lReturn = fCreateShellLink("..\..\Desktop", _
"Shortcut to Net Timer", MyPath & "\" & MyName, "")
'增加到启动组
lReturn = fCreateShellLink("\启动", "Shortcut to Net Timer", _
MyPath & "\" & MyName, "")
End Sub
|