Download the MATLAB DMG Installer:
- Visit MathWorks and log in with your MathWorks account.
- Download the MATLAB DMG installer for macOS.
Mount the DMG and Run the Installer:
- Double-click the downloaded DMG file to mount it.
- Open the mounted DMG and run the InstallForMacOSX.app.
Log In with Your Company Account:
- When prompted, log in using your company MathWorks account.
- Choose your license from the available options.
Select Advanced Options:
- Before proceeding with the installation, click on "Advanced Options."
- Choose the option "I want to download without installing."
Download the Installation Files:
- The installer will download the necessary installation files to a folder and then move to /private/tmp/MatlabR2024a
Create the Installer Input File:
- Navigate to the folder '/private/tmp/MatlabR2024a' and locate the installer_input.txt file.
Edit this file to include the following parameters:
destinationFolder=/Applications
agreeToLicense=yes
outputFile=/tmp/mathworks_install.log
enableLNU=yes
If deploying with a File Installation Key (FIK), add:
fileInstallationKey=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
Save the installer_input.txt file.
Create the Post-Installation Script:
Create a script to automate the installation process:
#!/bin/bash
INSTALL_DIR="/private/tmp/MatlabR2024a"
# Run the installer
"$INSTALL_DIR"/install -inputFile "$INSTALL_DIR"/installer_input.txt
# Check if the installation was successful
if [ $? -eq 0 ]; then
echo "MATLAB installation completed successfully."
else
echo "MATLAB installation failed." >&2
exit 1
fi
# Clean up the installation files if needed
# Uncomment the following line to remove the installer files after installation
# rm -rf "$INSTALL_DIR"
Save this script as install_matlab.sh.
Packaging the Installation for JAMF Deployment:
- Open JAMF Composer.
- Drag the /private/tmp/MatlabR2024a-Offsite folder into Composer.
- Drag the install_matlab.sh script into Composer under the “Scripts” tab, ensuring it runs After the installation.
- Remove any .DS_Store files from the package.
- Build the package in Composer.
Upload the Package to JAMF:
- Open JAMF Admin.
- Upload the built package from Composer to JAMF Admin.
- Assign it to the appropriate categories and groups.
Create a JAMF Policy for Deployment:
- Open JAMF Pro and create a new policy.
- Assign the uploaded MATLAB package to the policy.
- Set the policy to deploy during a specific trigger (e.g., Self Service, Recurring Check-in).
- Save and scope the policy to the required devices.