[Resolved] Listing of Programs in Start Menu
Hi Good Day!
Is it possible for us to list all the programs listed on the start menu? What I really wanted is to get all the installed applications in your computer and list it perhaps in a list box or a text box.
If so, how? Could you give me a sample code for that? Thank you very much.
Re: Listing of Programs in Start Menu
[Highlight=VB]Option Explicit
Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Dim DDrive As String
Private Sub getFolders()
Dim fso As New FileSystemObject
Dim fd As Folder
'start at the C:\ drive
Set fd = fso.GetFolder(DDrive & "program files\")
Set fso = Nothing
For Each fd In fd.SubFolders
List1.AddItem fd
Next fd
End Sub
Private Sub Form_Load()
Getpath_WINDOWS
getFolders
End Sub
Private Sub Getpath_WINDOWS()
Dim WindirS As String * 255 'declares a full lenght string for DIR name(for getting the path)
Dim TEMP 'a temporarry variable that holds LENGHT OF THE FINAL PATH STRING
Dim Result 'a variable for holding the the output of the function
TEMP = GetWindowsDirectory(WindirS, 255) 'holds the FUUL(include unneccessary charecters)Path
Result = Left(WindirS, TEMP) 'holds final path
DDrive = Left(Result, 3)
End Sub
[\vbcode]
Re: Listing of Programs in Start Menu
Thank a lot UnderTheTable! Your very helpful! Thanks