Check if Adobe Reader is installed-VBForums
Results 1 to 11 of 11

Thread: Check if Adobe Reader is installed

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2016
    Posts
    290

    Check if Adobe Reader is installed

    Hello everyone
    I'm compiling a help file as a pdf file.
    I'm looking for a code to check if Adobe is not installed on the machine and then tell the user that he should install Adobe to be able to open the help file.
    thanks

  2. #2
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    5,675

    Re: Check if Adobe Reader is installed

    Have you searched anywhere for this capability?

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2016
    Posts
    290

    Re: Check if Adobe Reader is installed

    Quote Originally Posted by SamOscarBrown View Post
    Have you searched anywhere for this capability?
    I searched but I found nothing about that.

  4. #4
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    5,675

    Re: Check if Adobe Reader is installed


  5. #5
    Fanatic Member
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    571

    Re: Check if Adobe Reader is installed

    What if the user doesn't have Adobe Reader installed but instead uses a different PDF viewer? Probably better try a ShellExecute "open" for a .pdf file. ShellExecute will return 31 if there the extension is not associated with the open verb in this case, so you can test for that and then recommend that the user install PDF reader software.

  6. #6
    Frenzied Member gibra's Avatar
    Join Date
    Oct 2009
    Location
    ITALY
    Posts
    1,238

    Re: Check if Adobe Reader is installed

    I agree with jpbro.

    You should use ShellExecute with 'open' verb to open the file using the default application, set by user your system.
    If ShellExecute fails then you can tell the user to install a PDF reader, any reader he wants.

  7. #7
    PowerPoster
    Join Date
    Dec 2004
    Posts
    22,371

    Re: Check if Adobe Reader is installed

    You should use ShellExecute with 'open' verb to open the file using the default application
    in most cases, if no other pdf reader is installed, the default webbrowser will then open any pdf file
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2016
    Posts
    290

    Re: Check if Adobe Reader is installed

    thank you very much for the interesting replies

  9. #9
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    5,675

    Re: Check if Adobe Reader is installed

    HKEY_CLASSES_ROOT\.pdf\OpenWithList has a list of registered applications that open .pdf files.

    Just check that Registry Entry with VB6.

    Also, know that MS Word can open .pdf files, although (13 and possibly other versions) it will have to convert it first. So, if Word appears in that Registry Entry ignore it if you want. Just look for other apps there that can open .pdf files.

  10. #10
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    5,675

    Re: Check if Adobe Reader is installed

    Attached is a program I modified that will search HKEY_CLASSES_ROOT\.pdf\OpenWithList and show you what programs are on your computer that can open .pdf files.
    Attached Files Attached Files

  11. #11

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2016
    Posts
    290

    Re: Check if Adobe Reader is installed

    SamOscarBrown
    You are so kind
    thanks million times

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.