Basic instructions for building a silent installer for Mathematica 8 can be found at:
http://reference.wolfram.com/mathematica/tutorial/InstallingMathematica.html
We use a network wide license server to license this application. To create the license file “mathpass” on windows – install the application and then copy the license file from c:\programdata\mathematic\licensing\mathpass
This file seems to also be valid in c:\progam files (x86)\\Wolfram Research\Mathematica\8.0\Configuration\Licensing
So I have created a script that installs mathematica silently and then copies this “mathpass” file into place …
@echo off
break=off
set install_dir=%~dp0
rem Tell the user what you are doing
echo ———–
echo This program installs a copy of the Williams College licensed
echo Mathematica 8.
echo ———–
echo Currently installing from %install_dir% …
echo ———–REM Detect correct Program Files folder. Note this batch file may run in 32-bit env (SysWOW64/cmd.exe)
REM So %ProgramFiles% might be Program Files (x86), but we always want to check the regular Program Files.
set K64=no
if “%ProgramFiles(x86)%” == “” goto on32Bit
set K64=yes
echo Detected 64-bit OS …
echo ———–:on32Bit
REM Set inprogramfiles to either 32-bit or 64-bit stuctureSET inProgramFiles=%ProgramFiles(x86)%
IF NOT EXIST “%inProgramFiles%” SET inProgramFiles=%ProgramFiles%
echo Program files directory set to: %inProgramFiles%
echo ———–rem run the silent installer
echo Installing application …
echo ———–
“%install_dir%payload\Mathematica_8.0.1_WIN.EXE” /silent /norestartrem copy in the license file
echo ———–
xcopy /Y /Q /R “%install_dir%payload\mathpass” “%inProgramFiles%\Wolfram Research\Mathematica\8.0\Configuration\Licensing”
If %errorlevel%==0 goto no_error:error
rem do something if there was an error
echo ———–
echo The Williams College licensed version of this software did not install correctly.
echo Please be sure you ran this installer as an administrator. On Vista and Windows 7
echo you need to right-click on the installer and select “Run as Administrator”.
echo Please contact OIT for additonal help with this install.
echo ———–
pause
exitrem there was no error in the install AND the filter copy and there was no break
:no_error
echo ———–
echo The installation is complete.
echo ———–:end
pause
rd /S /Q “%install_dir%payload”
del /Q “%install_dir%instal*”
exit