MathWorks MATLAB is a programming platform designed specifically for engineers and scientists to analyze and design systems and products that transform our world. The heart of MATLAB is the MATLAB language, a matrix-based language allowing the most natural expression of computational mathematics. This article will serve as an informative guide and give you a clear understanding of how to perform a silent installation of MathWorks MATLAB R2017 from the command line using the EXE installer.
How to Install MathWorks MATLAB R2017 Silently
MathWorks MATLAB R2017 Silent Install (EXE)
- Navigate to: https://www.mathworks.com/downloads
- Download the MATLAB ISO archives
Note: You must be a license administrator to download the MATLAB ISO archives. The MATLAB installer is split across two ISO archives. As a result you must merge the two ISO archives together to obtain a complete set off offline installation files. See the following article for further details on how to accomplish this: https://www.mathworks.com/matlabcentral/answers/320198-how-can-i-obtain-a-single-installation-package-for-matlab-with-the-isos-merge-the-iso-images
- Extract the two ISO archives using 7-Zip to “C:\Downloads\R2017x_win64”
- Modify the installer_input.txt installer properties file located in the “C:\Downloads\R2017x_win64” directory based on your preferences
- See https://www.mathworks.com/help/install/ug/install-noninteractively-silent-installation.html
Example:
destinationFolder=C:\Program Files\MATLAB\R2017a
fileInstallationKey=#####-#####-#####-#####-#####-#####-#####-#####-#####-#####
agreeToLicense=yes
outputFile=C:\Windows\Temp\MATLAB_R2017a-Install.log
mode=silent
licensePath=C:\Program Files\MATLAB\R2017a\license.lic
- You can find the Activation Key and File Installation Key in the License Center
- Download & Copy your license file (license.lic or license.dat) to “C:\Downloads\R2017x_win64”
- See https://www.mathworks.com/matlabcentral/answers/235126-how-do-i-generate-a-matlab-license-file for further details
- Open Notepad or your favorite text editor
- Add the following lines:
isSilent=true
activateCommand=activateOffline
licenseFile=C:\Program Files\MATLAB\R2017a\license.lic
installLicenseFileDir=C:\Program Files\MATLAB\R2017a\
installLicenseFileName=license.lic
- Save the file to “C:\Downloads\R2017x_win64” & name it activate.ini
- Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
- Navigate to the “C:\Downloads\R2017x_win64” folder
- Enter the following commands:
xcopy ".\license.lic" /y /e "C:\Program Files\MATLAB\R2017a\" |
|
xcopy ".\license.lic" /y /e "C:\Program Files\MATLAB\R2017a\licenses\" |
After several minutes you will find MATLAB R2017 entries in the Start Menu, Installation Directory and Programs and Features in the Control Panel.
Software Title: | MATLAB R2017 |
Vendor: | MathWorks |
Version: | 2017 |
Architecture: | x64 |
Installer Type: | EXE |
Silent Install Switch: |
|
Silent Uninstall Switch: | "%ProgramFiles%\MATLAB\R2017x\uninstall\bin\win64\uninstall.exe" -mode silent |
Download Link: | https://www.mathworks.com/downloads |
PowerShell Script: | https://silentinstallhq.com/mathworks-matlab-r2017-install-and-uninstall-powershell/ |
The information above provides a quick overview of the software title, vendor, silent install, and silent uninstall switches. The download link provided take you directly to the vendors website. Continue reading if you are interested in additional details and configurations.
Additional Configurations
Create a MathWorks MATLAB R2017 Installation Log File
The MathWorks MATLAB R2017 installer offers the option to generate a log file during installation to assist with troubleshooting should any problems arise. You can use the following commands to create a verbose log file with details about the installation.
MathWorks MATLAB R2017 Silent Install with Logging
- Modify the installer_input.txt installer properties file referenced earlier in the article to include the following line:
outputFile=C:\Windows\Temp\MATLAB_R2017a-Install.log
- Note: This log file is EXTREMELY valuable when troubleshooting installation problems. If the install is failing for any reason, reference this log and it will tell you exactly what is wrong.
How to Uninstall MathWorks MATLAB R2017 Silently
Check out the MathWorks MATLAB R2017 Install and Uninstall (PowerShell) post for a scripted solution.
- Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
- Enter one of the following commands:
MathWorks MATLAB R2017a Silent Uninstall (EXE)
"%ProgramFiles%\MATLAB\R2017a\uninstall\bin\win64\uninstall.exe" -mode silent |
MathWorks MATLAB R2017b Silent Uninstall (EXE)
"%ProgramFiles%\MATLAB\R2017b\uninstall\bin\win64\uninstall.exe" -mode silent |
MathWorks MATLAB R2017 Silent Uninstall (EXE) with Logging
"%ProgramFiles%\MATLAB\R2017x\uninstall\bin\win64\uninstall.exe" -mode silent -outputFile C:\Windows\Temp\MATLAB_R2017x-Uninstall.log |
MathWorks MATLAB R2017 Silent Uninstall (EXE) with MATLAB Preferences Removed
"%ProgramFiles%\MATLAB\R2017x\uninstall\bin\win64\uninstall.exe" -mode silent -prefs yes |
Always make sure to test everything in a development environment prior to implementing anything into production. The information in this article is provided “As Is” without warranty of any kind.