Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determine if program is installed

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
Hi,
Is there some function using which it it possible to find out if a particular is available on a machine or not? I would like to use the exe filename to perform this search. For ex. if I were to determine if Notepad was installed or nor, I would use the notepad.exe file to search. The program that I would actually like to search does not have any associated file types.

Any other method that accomplishes the task of determining the existence would be helpful.

Thanks a lot in advance.
 
Hi ayyapps,

I use the Registry Access Functions Library (RegObj.dll)
to do an EXE Application Search:-


Public Function AppExists(sAppExe As String) As Boolean
'----------------------------------------------------------
' Author: Codefish
'
' Date: 22/05/2000
'
' History:
'
' Purpose: - Checks to see whether a Application is
installed on the machine.
'
' Notes: - Need Registry Access Functions Library
' (RegObj.dll) in project references.
'
' - sAppExe in the Form "Excel.exe"
'----------------------------------------------------------

'Declare Registry Object and Variables
Dim oReg As REGTool5.Registry
Dim bKeyFound As Boolean
Dim sValue As String

'Instantiate Registry Object
Set oReg = New REGTool5.Registry

'Reset Values
AppExists = False
sValue = ""

'Check Registry
bKeyFound = oReg.GetKeyValue(HKEY_LOCAL_MACHINE, _
"Software\Microsoft\Windows\CurrentVersion\" & _
"App Paths\" & sAppExe , "Path", sValue)

'Return Result
If bKeyFound Then
AppExists = True
End If

'Release Reference
Set oReg = Nothing

End Function


Hope this helps,

Codefish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top