Results 1 to 4 of 4
  1. #1
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Detecting Adobe Reader (XP Home SP2)

    Whereas in the past our local senior center has provided some 80 pages of printed lesson materialsI for a beginning XP class, we are now preparing lessons on a self-loading CD in PDF format. I have a batch file that creates a folder on the student's desktop where they can access the PDF files. I also have the Adobe Reader on the CD should the student's computer not have it installed. Is there a batch file method for determining whether the computer has Adobe Reader installed and if not then run the Reader installation?

  2. #2
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Detecting Adobe Reader (XP Home SP2)

    This is probably XP-only, but I use this chuck of BATch code to see if a file is executable (being in the current directory or in the system path).<pre>setlocal
    set musthave=AcroRd32.exe
    for /f %%a in ("%musthave%") do set runnable=%%~f$path:a
    if exist %musthave% set runnable=true
    if not defined runnable echo %~n0: %musthave% not found in path^
    or in current directory & endlocal & goto :eof</pre>

    The problem with checking if the file exists in a particular directory is that the directory names change, e.g.
    "C:Program FilesAdobeAcrobat 7.0ReaderAcroRd32.exe"

    As to running the Adobe Reader installation from a BATch file, I think that is beyond anything I've seen. But if you have the installation on the CD, just point to the SETUP.EXE file (or whatever it should be!).

    John
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  3. #3
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Detecting Adobe Reader (XP Home SP2)

    Thanks John,
    I'll sve your code for a future project. However, I discovered that by simply running the Adobe exe file from the CD it would either perform a new installation or, if it detected a previous one, it asks if you want to repair or delete the existing program. Repair will install the latest version. Thus, I didn't need to detect its presence. Hopefully this will avoid a lot of problems with the installation.

  4. #4
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Detecting Adobe Reader (XP Home SP2)

    Looks like they've done all your work for you!

    John
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

Posting Permissions

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