install.URL: Downloads and runs a .exe installer file for some software from a URL
Description
Gets a character with a link to an installer file,
downloads it, runs it, and then erases it.Usage
install.URL(exe_URL, keep_install_file = FALSE, wait = TRUE,
download_dir = tempdir(), massage = TRUE, installer_option = NULL, ...)
Arguments
exe_URL
A character with a link to an installer
file (with the .exe file extension)
keep_install_file
If TRUE - the installer file
will not be erased after it is downloaded and run.
wait
should the R interpreter wait for the command
to finish? The default is to NOT wait.
download_dir
A character of the directory into
which to download the file. (default is
tempdir()) massage
boolean. Should a massage on the file be
printed or not (default is TRUE)
installer_option
A character of the command line
arguments
...
parameters passed to 'shell'
Value
- invisible(TRUE/FALSE) - was the installation successful or
not. (this is based on the output of shell of running the
command being either 0 or 1/2. 0 means the file was
succesfully installed, while 1 or 2 means there was a
failure in running the installer.)
Details
This function is used by many functions in the installr
package. The .exe file is downloaded into a temporary
directory, where it is erased after installation has
started (by default - though this can be changed)Examples
Run this codeinstall.URL("adfadf") # shows the error produced when the URL is not valid.
Run the code above in your browser using DataLab