finding a list of apps on users pc

Posted on 2000-02-03
Medium Priority
Last Modified: 2010-05-02
I used to know a command that would list all the apps that were available on a users pc but have forgotten. any ideas?
Question by:jackg
  • 2
LVL 13

Expert Comment

ID: 2485359
do you mean apps that are running or all exe 's?

Author Comment

ID: 2485413
yeah all exes
LVL 13

Accepted Solution

crazyman earned 50 total points
ID: 2485464
Sub FilesSearch(DrivePath As String, Ext As String)
On Error GoTo o:
        Dim XDir() As String
        Dim TmpDir As String
        Dim FFound As String
        Dim DirCount As Integer
        Dim X As Integer
        'Initialises Variables
        DirCount = 0
        ReDim XDir(0) As String
        XDir(DirCount) = ""
        If Right(DrivePath, 1) <> "\" Then
            DrivePath = DrivePath & "\"
        End If
        'Enter here the code for showing the path being
        'search. Example: Form1.label2 = DrivePath
        'Search for all directories and store in the
        'XDir() variable
            TmpDir = Dir(DrivePath, vbDirectory)
            Do While TmpDir <> ""
                On Error GoTo o
                If TmpDir <> "." And TmpDir <> ".." Then
                    If (GetAttr(DrivePath & TmpDir) And vbDirectory) = vbDirectory Then
                        XDir(DirCount) = DrivePath & TmpDir & "\"
                        DirCount = DirCount + 1
                        ReDim Preserve XDir(DirCount) As String
                    End If
                End If
                TmpDir = Dir
            'Searches for the files given by extension Ext
            FFound = Dir(DrivePath & Ext)
            Do Until FFound = ""
                'Code in here for the actions of the files found.
                'Files found stored in the variable FFound.
                'Example: Form1.list1.AddItem DrivePath & FFound
                FFound = Dir
            'Recursive searches through all sub directories
            For X = 0 To (UBound(XDir) - 1)
                 FilesSearch XDir(X), Ext
            Next X
Exit Sub
Resume Next
        End Sub

then call using

FilesSearch "c:\","*.exe"

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question