代码如下: Declare Function OSfCreateShellGroup Lib "STKIT432.DLL" Alias "fCreateShellFolder" _ (ByVal lpstrDirName As String) As LongDeclare Function fCreateShellLink Lib "STKIT432.DLL" (ByVal _ lpstrFolderName As String, ByVal lpstrLinkName As String, _ ByVal lpstrLinkPath As String, ByVal lpstrLinkArgs As String) As LongPublic Sub CreateShellGroup(ByVal strFolderName As String)If strFolderName = "" Then Exit Sub End IfDim fSuccess As Boolean fSuccess = OSfCreateShellGroup(strFolderName)End Sub 'use asDim res& Dim vLocation$vLocation$ = "testing" Call CreateShellGroup(vLocation$) vLocation$ = "..\..\Start Menu\Programs\" & vLocation$ res& = fCreateShellLink(vLocation, [title], [path&executable], "")'where ' title = name to be mentioned ' path&executable = full path and executable name of application
Declare Function OSfCreateShellGroup Lib "STKIT432.DLL" Alias "fCreateShellFolder" _
(ByVal lpstrDirName As String) As LongDeclare Function fCreateShellLink Lib "STKIT432.DLL" (ByVal _
lpstrFolderName As String, ByVal lpstrLinkName As String, _
ByVal lpstrLinkPath As String, ByVal lpstrLinkArgs As String) As LongPublic Sub CreateShellGroup(ByVal strFolderName As String)If strFolderName = "" Then
Exit Sub
End IfDim fSuccess As Boolean
fSuccess = OSfCreateShellGroup(strFolderName)End Sub
'use asDim res&
Dim vLocation$vLocation$ = "testing"
Call CreateShellGroup(vLocation$)
vLocation$ = "..\..\Start Menu\Programs\" & vLocation$
res& = fCreateShellLink(vLocation, [title], [path&executable], "")'where
' title = name to be mentioned
' path&executable = full path and executable name of application