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

# References

# General Info

Installing Mathematica silently is incredibly simple; the setup executable can be called with the /silent switch. Licensing is done by creating a file called mathpass (no file extension) containing the host name of the license server. The mathpass file is then placed in the Mathematica install folder.

# Process

- Copy the Mathematica setup file to the SCCM package folder for Mathematica.
- Create a file in the source folder named “mathpass”. The file should contain 1 line: an apostrophe followed by the name of the license server. For example: !license-mathematica.domain.tld.
- Create a script named “Make-Shortcuts_Mathematica.ps1″ that creates the MathCAD 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\Wolfram Research\Mathematica\8.0\mathematica.exe”

Shortcut Name: “Mathematica 8.lnk” - Create a batch file named “Install-mathematica.cmd” with the following contents:
@ECHO OFF ECHO Installing Mathematica 8 ECHO Do not close this window. It will close when the install is finished. REM Main Install Mathematica_8.0.4_WIN.exe /silent /suppressmsgboxes /log="C:\Windows\Temp\install.log" REM License xcopy /y .\mathpass "C:\Program Files\Wolfram Research\Mathematica\8.0\Configuration\Licensing\" REM Shortcuts powershell -noprofile -command "& {$a = get-executionpolicy;If((get-executionpolicy) -ne 'Unrestricted'){set-executionpolicy unrestricted -force;}; .\Make-Shortcuts_Mathematica8.ps1; set-executionpolicy $a}" rmdir /s /q "%programdata%\microsoft\windows\start menu\programs\wolfram mathematica"

- Assemble the files into a single source folder then create a SCCM package and program. The program’s command line action should be “install-mathematica.cmd”. The following is a screen shot of my final source folder.

Great! Only 30 more packages or so :/. Haha.

Pingback: Table of Contents | windowsmasher