You can modify the contents of the Start Menu directory. Here's how to retrieve its name:
Usage:Code:Option Explicit Private Declare Function SHGetSpecialFolderLocation Lib "shell32" (ByVal hWndOwner As Long, ByVal nFolder As Long, ppIDL As Long) As Long Private Declare Function SHGetPathFromIDList Lib "shell32" Alias "SHGetPathFromIDListA" (ByVal pIDL As Long, ByVal pszPath As String) As Long Private Const CSIDL_STARTMENU = &HB Private Const MAX_PATH As Integer = 260 Function GetStartMenuPath() As String Dim iPos As Integer Dim pIDL As Long ' Pointer to ID List Call SHGetSpecialFolderLocation(0, CSIDL_STARTMENU, pIDL) GetStartMenuPath = String(MAX_PATH, vbNullChar) Call SHGetPathFromIDList(pIDL, GetStartMenuPath) iPos = InStr(GetStartMenuPath, vbNullChar) If iPos > 0 Then GetStartMenuPath = Left(GetStartMenuPath, iPos - 1) End Function
Dim S As String
S = GetStartMenuPath
------------------
Yonatan
Teenage Programmer
E-Mail: [email protected]
ICQ: 19552879




Reply With Quote