|
-
Mar 16th, 2000, 08:20 PM
#1
Thread Starter
Member
I am trying to search to see if a computer has AcroRd32.exe(the acrobat reader) installed on their computer. Can any of you give me some sample code to check if a computer has the reader on it? Thanks!!
-
Mar 16th, 2000, 08:23 PM
#2
Hyperactive Member
If you know where the file is you could try and open the file. If the open fails, its not there.
You dont want to search the entire harddrive(s) though.
Maybe theres a better way? Perhaps a registry entry you could check?
Alex.
-
Mar 16th, 2000, 08:42 PM
#3
Thread Starter
Member
Well what happens when I don't know where the file is?
-
Mar 16th, 2000, 09:04 PM
#4
Junior Member
Jay=B is right.
He's trying to search for specific file.
If you check in Registry it is not a comment idea.
What happen if the registry file exist data about Acrobat.
But the AcroRd32.exe and its set had been delete without uninstall.
So Jay=B I think you should do a little search in vb Forum.
There is a Tip about Seaching entire HD.
good luck
-
Mar 17th, 2000, 05:05 AM
#5
Try something like this:
Code:
Private Declare Function FindExecutable Lib "shell32.dll" Alias "FindExecutableA" (ByVal lpFile As String, ByVal lpDirectory As String, ByVal lpResult As String) As Long
Private Sub Command1_Click()
Dim sEXE As String
'Create an empty file with the Acrobat Extension
Open "C:\test.pdf" For Output As 1
Close 1
'Find the path to the Program associated with PDF's
sEXE = Space(255)
Call FindExecutable("C:\Test.pdf", "", sEXE)
If InStr(sEXE, Chr(0)) Then sEXE = Left$(sEXE, InStr(sEXE, Chr(0)) - 1)
If Len(sEXE) Then
'If an EXE was found check it still exists
If Len(Dir(sEXE)) Then
MsgBox "Acrobat is installed" & vbCrLf & _
"Located in: " & sEXE
Else
MsgBox "Acrobat isn't installed"
End If
Else
MsgBox "Acrobat isn't installed"
End If
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|