SCCM Packages – Matlab R2011b

I’m making a series of posts describing the package creation process for the applications my current lab image. This post is about Matlab R2011.

References

General Info

Installing Matlab R2011b with SCCM is a bit tricky. SCCM has a soft limit on the number of files able to be effectively contained in a package, and the Matlab install media comes close to this limit. This caused weirdness. To overcome the issue, I wrap the Matlab installation files in a SFX file. Licensing is done by creating and specifying a “license file” with the name of the license server, it’s mac address, and the license server port number.

Process

  1. Copy the Matlab R2011b media to C:\temp\matlab\media
  2. Move the file named “installer_input.txt” from C:\temp\matlab\media to the SCCM Matlab package source folder.
  3. Using WinRAR, create a SFX file containing the contents of C:\temp\matlab\media with the following parameters:
    Path to extract — leave blank
    Silent mode – hide start dialog
    Update – overwrite existing files
  4. The final SFX should look like the following image and be named matlab2011b.exe.
  5. Edit installer-input.ini and change options as necessary. My installer-input.ini file is as follows:
    destinationFolder=C:\Program Files\MATLAB\R2011b
    fileInstallationKey=#####-#####-#####-#####-#####-#####-#####-#####-#####-#####
    agreeToLicense=yes
    outputFile=C:\matlabinstall.log
    mode=silent
    automatedModeTimeout=2000
    licensePath=matlab_clientlicensefile.lic
    lmgrFiles=false
    lmgrService=false
    setFileAssoc=true
    desktopShortcut=false
    startMenuShortcut=false
    createAccelTask=false
  6. Create a file named “matlab_clientlicensefile.lic” in your package source folder with the following contents. For the HostID enter the mac address of the license server with capital letters and no spaces, dashes, or colons between the couplets.
    # BEGIN--------------BEGIN--------------BEGIN
    # MathWorks license passcode file.
    # LicenseNo: ######   HostID: ############
    #
    # R2011b
    # format is SERVER [servername] [servermac] [portNum]
    SERVER lic-mathcad ############ 27000
    
  7. Create a script named “Make-Shortcuts_matlab.ps1″ that creates the Matlab shortcuts. For help creating a shortcut script see my previous blog post “Creating Shortcuts for SCCM Packages“.
    Use the following parameters:
    Target Path: “C:\Program Files\Matlab\R2011b\bin\matlab.exe”
    Shortcut Name: “Matlab R2011b.lnk”
  8. Create a batch file named “Install-matlab.cmd” with the following contents:
    @ECHO OFF
    ECHO Installing Matlab R2011b
    ECHO Do not close this window. It will close when the install is finished.
    
    REM Main Install
    start /wait matlab2011b.exe
    %~dp0bin\win64\setup.exe -inputFile installer_input.txt -activationPropertiesFile activate_custom.ini
    
    REM Licensing
    xcopy "matlab_clientlicensefile.lic" /y /e "C:\Program Files\MATLAB\R2011b\"
    
    REM Run Shortcut Script
    powershell -noprofile -command "& {$a = get-executionpolicy;If((get-executionpolicy) -ne 'Unrestricted'){set-executionpolicy unrestricted -force;}; .\Make-Shortcuts_Matlab.ps1; set-executionpolicy $a}"
  9. Assemble the files into a single source folder then create a SCCM package and program. The program’s command line action should be “install-matlab.cmd”. The following is a screen shot of my final source folder.

Now, only 29 or so left ;).

Advertisements

6 thoughts on “SCCM Packages – Matlab R2011b

  1. Pingback: MATLAB R2012a silent install « srikanthyellow

  2. Pingback: Table of Contents | windowsmasher

  3. Pingback: MATLAB R2012a silent install | SCCM Packager

  4. Pingback: MATLAB R2012a silent install | Srkanth Yellow

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s