MATLAB: How to silently install Support Packages in MATLAB R2018a or newer

MATLAB

How do I silently install Support Packages in MATLAB R2018a or newer?

Best Answer

This process is not available in MATLAB releases prior to R2018a.
In order to install a support package silently you will need to follow the procedure in the article below to download the files for the support package before hand.
How do I Download and Install a Support Package on an Offline Machine?
Once you obtained the installation files for the support package please follow the below workflow to silently install support packages:
If MATLAB has not been run on the target machine, you must be set to root first. Set the support package to root by launching MATLAB running the following command at the MATLAB prompt and then closing MATLAB.
_installFolder = matlabshared.supportpkg.getSupportPackageRoot; matlabshared.supportpkg.setSupportPackageRoot(installFolder);_
.
WINDOWS:
  • Open a command prompt window, and run the following commands:
  • <MATLAB root directory>\bin\win64\SupportSoftwareInstaller.exe -downloadfolder <pathtodownloadfolder> -inputFile <pathtoinputFile>\ssi_input.txt
Example:
C:\Program Files\MATLAB\R20XXx\bin\win64\SupportSoftwareInstaller.exe -downloadfolder C:\Users\jsmith\Downloads\MathWorks\SupportPackages\R20XXx -inputFile C:\Users\jsmith\Downloads\MathWorks\SupportPackages\R20XXx\ssi_input.txt
LINUX:
  • Open a terminal window, and run the following command:
  • <MATLAB root directory>/bin/glnxa64/SupportSoftwareInstaller -downloadfolder <pathtodownloadfolder> -inputFile <pathtoinputFile>/ssi_input.txt
Example:
/usr/local/MATLAB/R20XXx/bin/glnxa64/SupportSoftwareInstaller -downloadfolder /home/jdoe/Downloads/MathWorks/SupportPackages/R20XXx -inputFile /home/jdoe/Downloads/MathWorks/SupportPackages/R20XXx/ssi_input.txt
MAC:
  • Open a terminal window, and run the following command:
  • <MATLAB root directory>/bin/maci64/SupportSoftwareInstaller.sh-downloadfolder <pathtodownloadfolder> -inputFile <pathtoinputFile>/ssi_input.txt
Example:
/Applications/MATLAB_R20XXx.app/bin/maci64/SupportSoftwareInstaller.sh -downloadfolder /Users/jdoe/Downloads/MathWorks/SupportPackages/R20XXx -inputFile /Users/jdoe/Downloads/MathWorks/SupportPackages/R20XXx/ssi_input.txt
For the path to the input file and path to user’s install folder, you can use an absolute or relative path.
This command may take several minutes to run. When it is done, check the log file make sure the
NOTE: The procedures below must be run as an administrator.
When you download the support packages for installation (in Article above), the installer creates a configuration file for use with silent install, named ssi_input.txt. Inside this file is a list of the support packages to be installed.
Inside the config file, each support package has two lines – the first contains a product description and the second a product code that installer uses. If there are any support packages you want to remove from the installation, you can comment them out or delete the lines from the config file.
*IMPORTANT: Silent install pertains to the support software installer only. Any third-party support packages that require an interactive install will still require your interaction. *
Each time you perform a download, the configuration file is refreshed to add the new support packages. To regenerate the configuration file from scratch, delete the existing one or use another directory for the download.
If there is a failure in downloading a support package, that support package will not be listed in the config file. Before performing a silent install, check the config file to make sure that all the support packages you expect to be installed are listed. After installing, any failures are listed in the log file.