[R] shell.exec() on Windows, unexpected behavior

From: Richard M. Heiberger <rmh_at_temple.edu>
Date: Fri, 11 May 2007 19:37:13 -0400 (EDT)


I have Windows XP machines with different software configurations. My laptop has Adobe Reader 8 and Adobe Acrobat 6. My desktop has Adobe Reader 8 and does not have Adobe Acrobat.

On both machines, PDF extensions are registered to Adobe Reader 8.0, and double-clicking a pdf file in Windows Explorer opens Adobe Reader 8.0.

In R-2.5.0, with all Adobe windows closed, the command   shell.exec('c:/Program Files/R/R-2.5.0/doc/manual/R-admin.pdf') opens an Adobe window.
On the laptop, it opens Adobe Acrobat 6.0. On the desktop, it opens Adobe Reader 8.0.

When an Adobe window is aleady open, shell.exec() uses the already open Adobe window.

Neither machine has any Adobe directories in the shell("PATH").

I am puzzled by shell.exec() opening "Adobe Acrobat" when the file extension is registered to "Acrobat Reader". The documentation in ?shell.exec says "Opens the specified file or URL using the application specified in the Windows file associations."

thanks
Rich



R-help_at_stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 11 May 2007 - 23:44:38 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 12 May 2007 - 02:31:21 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.