Results 1 to 3 of 3

Thread: [Resolved] Listing of Programs in Start Menu

  1. #1

    Thread Starter
    Addicted Member charmedcharmer's Avatar
    Join Date
    Sep 2003
    Posts
    211

    Lightbulb [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.
    Last edited by charmedcharmer; Jul 23rd, 2005 at 07:07 AM. Reason: Resolved
    C++ Programming is overwhelming.

    Dont let it overwhelm you or you'll fall into the oblivion of its perfection

  2. #2
    Lively Member UnderTheTable's Avatar
    Join Date
    Jan 2003
    Location
    beside HeLL
    Posts
    113

    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]
    Destination is not by CHANCE, of CHOICE

  3. #3

    Thread Starter
    Addicted Member charmedcharmer's Avatar
    Join Date
    Sep 2003
    Posts
    211

    Re: Listing of Programs in Start Menu

    Thank a lot UnderTheTable! Your very helpful! Thanks
    C++ Programming is overwhelming.

    Dont let it overwhelm you or you'll fall into the oblivion of its perfection

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width