MathWorks MATLAB R2021 Silent Install (How-To Guide)


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 R2021 from the command line using the EXE installer.

How to Install MathWorks MATLAB R2021 Silently

MathWorks MATLAB R2021 Silent Install (EXE)

Note: You must be a license administrator to download the MATLAB ISO archives.

Microsoft Power BI Desktop Silent I...
Microsoft Power BI Desktop Silent Install (How-To Guide)
 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

Example:

destinationFolder=C:\Program Files\MATLAB\R2021a
fileInstallationKey=#####-#####-#####-#####-#####-#####-#####-#####-#####-#####
agreeToLicense=yes
outputFile=C:\Windows\Temp\MATLAB_R2021a-Install.log
licensePath=C:\Program Files\MATLAB\R2021a\license.lic
  • Open Notepad or your favorite text editor
  • Add the following lines:
isSilent=true
activateCommand=activateOffline
licenseFile=C:\Program Files\MATLAB\R2021a\license.lic
installLicenseFileDir=C:\Program Files\MATLAB\R2021a\
installLicenseFileName=license.lic
  1. Save the file to “C:\Downloads\R2021x_win64” & name it activate.ini
  2. Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
  3. Navigate to the “C:\Downloads\R2021x_win64” folder
  4. Enter the following commands:
xcopy ".\license.lic" /y /e "C:\Program Files\MATLAB\R2021a\"
setup.exe -inputFile installer_input.txt -activationPropertiesFile activate.ini
xcopy ".\license.lic" /y /e "C:\Program Files\MATLAB\R2021a\licenses\"

After several minutes you will find MATLAB R2021 entries in the Start Menu, Installation Directory and Programs and Features in the Control Panel.

Software Title:MATLAB R2021
Vendor:MathWorks
Version:2021
Architecture:x64
Installer Type:EXE
Silent Install Switch:setup.exe -inputFile installer_input.txt -activationPropertiesFile activate.ini
Silent Uninstall Switch:"%ProgramFiles%\MATLAB\R2021x\uninstall\bin\win64\uninstall.exe" -mode silent
Download Link:https://www.mathworks.com/downloads
PowerShell Script:https://silentinstallhq.com/mathworks-matlab-r2021-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 R2021 Installation Log File

The MathWorks MATLAB R2021 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 R2021 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_R2021a-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 R2021 Silently

Check out the MathWorks MATLAB R2021 Install and Uninstall (PowerShell) post for a scripted solution.

  1. Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
  2. Enter one of the following commands:

MathWorks MATLAB R2021a Silent Uninstall (EXE)

"%ProgramFiles%\MATLAB\R2021a\uninstall\bin\win64\uninstall.exe" -mode silent

MathWorks MATLAB R2021b Silent Uninstall (EXE)

"%ProgramFiles%\MATLAB\R2021b\uninstall\bin\win64\uninstall.exe" -mode silent

MathWorks MATLAB R2021 Silent Uninstall (EXE) with Logging

"%ProgramFiles%\MATLAB\R2021x\uninstall\bin\win64\uninstall.exe" -mode silent -outputFile C:\Windows\Temp\MATLAB_R2021x-Uninstall.log

MathWorks MATLAB R2021 Silent Uninstall (EXE) with MATLAB Preferences Removed

"%ProgramFiles%\MATLAB\R2021x\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.

Recent Posts