Here's some code that Elziko posted long time ago:
-----------------------------------------------
Private Declare Function FindExecutable Lib "shell32.dll" Alias "FindExecutableA" (ByVal lpFile As String, ByVal lpDirectory As String, ByVal lpResult As String) As Long
Public Function GetExe(file As String) As String
Dim sExec As String * 255
Dim lRetVal As Long
Dim iFN As Integer
Dim sTemp As String
sExec = Space(255)
' Then find the application associated with it.
lRetVal = FindExecutable(file, sTemp, sExec)
' If an application return the name
If lRetVal <= 32 Or IsEmpty(sExec) Then ' Error
Stop
Else
GetExe = Left(Trim$(sExec), Len(Trim$(sExec)) - 1)
End If
End Function
--------------------------------------------------------- Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.