Silent Installer for MatLab
MATLAB is a pain to install manually. Make a customized silent installer to install with a single command!
These directions were made for the R2020a version of MatLab, but will work with any recent version and likely with future versions.
First, download the MATLAB installer. You will need a valid MathWorks account. https://www.mathworks.com/downloads/web_downloads/
Run the installer.
It will automatically unzip to a temp folder in the same directory.
Continuing with the installer, you will be prompted to login. Login with your MathWorks account and accept the license agreement
After login you will be able to select “Advanced Options.”
Select “I want to download without installing.”
Select download location, platform, and products.
This will produce a folder similar to the temp folder that the installer extracted, but this folder will actually include all the binaries needed to install all the tools you are licensed to use. This download may take a while and may produce a large folder.
After the download completes, find the installer_input.txt file in folder you just downloaded.
The settings in installer_input.txt file control the behavior of a silent installer.
These are the only settings you need for an install that uses a network license server:
destinationFolder=C:\Program Files\MATLAB\R2020a
fileInstallationKey=ENTER_YOUR_FILE_INSTALLATION_KEY
agreeToLicense=yes
outputFile=C:\Program Files\MATLAB\R2020a\installer.log
licensePath=network.lic
setFileAssoc=true
desktopShortcut=false
startMenuShortcut=true
createAccelTask=false
enableLNU=no
you can edit the installer_input.txt, it contains directions, or download a simplified template here:
And here is the default installer_input.txt for comparison:
If you are using a network license server you can use this template as is just by adding your File Installation Key.
Name your network license file network.lic and copy it into the same folder with your installer_input.txt and other files.
If you are not using a network license server, comment out the line “licensePath=network.lic” by placing a “#” in front of the line. You can also leave out the network.lic file from your installation folder. Users will be prompted to login with a MathWorks account to active MatLab at first run of the application.
#licensePath=network.lic
Run this command in the Windows CLI to start install:
setup.exe -inputFile installer_input.txt
Monitor C:\Program Files\MATLAB\R2020a\installer.log for install progress
You can monitor the installation log in the Windows CLI with this command:
type "C:\Program Files\MATLAB\R2020a\installer.log"
Depending on the number of toolboxs your install includes it may take awhile.
You can combine this silent installer with PsExec to install to a remote PC across network!
Further reading:
https://www.mathworks.com/help/install/ug/download-without-installing.html
https://www.mathworks.com/help/install/ug/install-noninteractively-silent-installation.html
https://docs.microsoft.com/en-us/sysinternals/downloads/psexec