|
-
Sep 26th, 2000, 02:10 PM
#1
Thread Starter
Frenzied Member
How can i read from the start menu????
-
Sep 26th, 2000, 02:13 PM
#2
Fanatic Member
Try going to the directory where the start menu is kept. e.g. "c:\windows\start menu"
Iain, thats with an i by the way!
-
Sep 26th, 2000, 02:16 PM
#3
Fanatic Member
You can scan c:\windir\start menu with the dir function. This explains how to use the dir function: http://msdn.microsoft.com/library/de...8/vafctDir.htm
-
Sep 26th, 2000, 02:27 PM
#4
Guru
You read it with your eyes. 
Actually, you can read files from the Start Menu directory, like the other said.
This is usually C:\Windows\Start Menu.
But sometimes it is not, for example, on localized versions of windows, the directory name is "Start Menu" in another language. 
Here's a fail-proof way to get the correct Start Menu directory:
Code:
Option Explicit
Private Declare Function SHGetSpecialFolderLocation Lib "Shell32" (ByVal hWndOwner As Long, ByVal nFolder As Long, ppIDList As Long) As Long
Private Declare Function SHGetPathFromIDList Lib "Shell32" Alias "SHGetPathFromIDListA" (ByVal pIDList As Long, ByVal pszPath As String) As Long
Private Const CSIDL_STARTMENU = &HB
Private Const MAX_PATH = 260
Private Const NOERROR = 0
Function GetStartMenuPath() As String
Dim pIDList As Long, lPos As Long
If SHGetSpecialFolderLocation(0, CSIDL_STARTMENU, pIDList) = NOERROR Then
GetStartMenuPath = String(MAX_PATH, vbNullChar)
If SHGetPathFromIDList(pIDList, GetStartMenuPath) Then
lPos = InStr(GetStartMenuPath, vbNullChar)
If lPos > 0 Then GetStartMenuPath = Left(GetStartMenuPath, lPos - 1)
If Not Right(GetStartMenuPath, 1) = "\" Then GetStartMenuPath = GetStartMenuPath & "\"
End If
End If
End Function
-
Sep 26th, 2000, 02:37 PM
#5
Thread Starter
Frenzied Member
who ooo
tanx a lot YONATAN
That's what i was looking for.
You're right cuz me i work with windows NT and the start menu is in c:\winnt\profiles\sebastien\startmenu
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|