MATLAB Installer Woes

Hi,

For the last few weeks, I have been trying to get a software deployment package together for MATLAB. To install MATLAB with our license, you need two things, a file installation key and access to the license file, both of which are provided in an installer_input.txt silent install file. The silent install file provides a section to list a file path where setup can find the license file, network.lic. The suggested option is to use a network share, but that won’t work with IEM. IEM’s install process cannot access the server. I then tried placing the license file at the root of the package’s directory, right with setup.exe, and listing __Download\network.lic as the path in the silent install file, no luck. Using just network.lic with no path also didn’t work. My latest attempts have centered around trying to figure out the absolute path of the license file in Windows, after it has been downloaded from the server. I actually watched a deployment from __Download via \\IEMCLIENT\C$ share, but nothing ever arrived in that folder. Where do the downloaded file from the server actually go? Does it go to the same place each time? I’ve seen a couple of paths in the log file, referencing opsite112. Using the path C:\Program Files (x86)\BigFix Enterprise\BES Client\__BESData\__Download\opsite112 for the silent install file also didn’t work.

I know I can completely get around this issue by using a GPO to place a copy of the license file on the target machines before deployment, and removing it later, but it shouldn’t have to be this way. Besides, I don’t want copies of the license file on every machine in the domain, then there are the Macs which cannot use a GPO. Any help would be awesome and greatly appreciated.

Thanks

Can you provide the contents of the template installer_input.txt file?


There is a way to dynamically reference the download folder using relevance substitution, which is what I would recommend.

Use the Create File command to create the installer_input.txt file.

delete __createfile

createfile until END_OF_FILE
fileInstallationKey=
licensePath="{ download path "network.lic" }"
outputFile="{(pathname of folder "__BESData\__Global\Logs" of parent folder of client)}\install_MATLAB.log"
agreeToLicense=yes
mode=silent
desktopShortcut=false
setFileAssoc=true
startMenuShortcut=true
enableLNU=no
END_OF_FILE

delete __Download\installer_input.txt
copy __createfile __Download\installer_input.txt

waithidden __Download\setup.exe -inputFile "{ download path "installer_input.txt" }"

This is just a guess at the contents of the installer_input.txt file, but this should give you the general idea.


Related:

Still having issues. I added the files to the download package, and tried using a copy command to move them into the desired locations, but it just keeps failing with no answer why. The log just indicates that it fails, but not why.

Completed

prefetch d4a8c8c42ae4139810eefafe805887347c05
sha1:d4a8c8c42ae4139810eefafe805887347c05 size:7797757948 http://server.domain.com:12345/Uploads/d4a8c8c42ae4139810eefafe805887347c05/DVD.tmp

Completed

extract d4a8c8c42ae4139810eefafe805887347c05283f

Completed

delete "C:\Program Files\MATLAB\network.lic"

Completed

delete "C:\Program Files\MATLAB\installer_input.txt"

Failed

copy __Download\network.lic "C:\Program Files\MATLAB\network.lic"

copy __Download\installer_input.txt "C:\Program 
Files\MATLAB\installer_input.txt"

wait __Download\setup.exe -inputFile "C:\Program 
Files\MATLAB\installer_input.txt"

delete "C:\Program Files\MATLAB\installer_input.txt"

I’m not sure what else to do…

Any help would be greatly appreciated.

Hi …

Does the user under which this action runs have permission to write to c:\program files? Typically you can’t write to c:\program files unless you have administrator access. (This might be true even if the delete statement above it worked.)

Just a guess …

–Mark

As far as I know, IEM uses the SYSTEM account to do it’s work. That should be enough. One thing is for certain, given the amount of time I have wasted trying to get IEM to do this, I could have easily visited each computer and manually performed the install (30min p/machine). I’m not even going to mention the junk IEM spit out for deploying the Mac version of MATLAB, which failed right off the bat. No surprise there. Maybe IEM just can’t handle complex application installs?

1 Like

I tried having it create the installer_input.txt file, but that wouldn’t work either. It failed right at the first step (shocker).

We’ve used iem for literally everything without exception (including Matlab) try running the actions in fixlet debugger and see if you can figure out why that particular copy is failing.

I can try to dig up our Matlab fixlet tonight.

1 Like

That would be great! I’ve stepped through the process each time, and it works manually, but not in sequence. ???

Thanks

My matlab has a working directory in the download folder and is calling the installer_input with a relative path. I have no idea if this works but here’s what I would try:

Do the file copy and the software install in the batch script and if this fails review the SWD_DeploymentResults.log file to see why it might have failed.

parameter "logFolder" = "{parent folder of client folder of current site}/__Global/SWDDeployData"
folder create "{parameter "logFolder"}"
parameter "logFile" = "SWD_DeploymentResults.log"

delete __createfile
delete run.bat

createfile until _end_

@ECHO OFF
cd "{parameter "baseFolder"}"

echo %DATE:~10,4%_%DATE:~4,2%_%DATE:~7,2% %time% -- Action ID: {id of active action} >> "{parameter "logFolder"}/{parameter "logFile"}"

mkdir "C:\Program Files\Matlab" >> "{parameter "logFolder"}/{parameter "logFile"}"
copy network.lic "C:\Program Files\Matlab\network.lic" >> "{parameter "logFolder"}/{parameter "logFile"}"

rem //**Begin Command Marker
echo Command: setup.exe -inputFile silent-installer_input-win64.txt >> "{parameter "logFolder"}/{parameter "logFile"}"
set errorlevel=
setup.exe -inputFile installer_input.txt >> "{parameter "logFolder"}/{parameter "logFile"}" 2>&1

set SWDExitCode=%errorlevel%
rem //**End Command Marker

echo Return code: %SWDExitCode% >> "{parameter "logFolder"}/{parameter "logFile"}"
echo. >> "{parameter "logFolder"}/{parameter "logFile"}"
exit %SWDExitCode%
_end_

move __createfile run.bat
// You will not be able to stop or take action on an applicable BigFix Client until your installer completes.
// So ensure no user input is required.
// If your package absolutely must interact with the user, replace 'override wait' with 'override run' and 'wait' with 'run'.
override wait
hidden=true
completion=job
wait run.bat

For the Mac one we did it in a shell script…

cp -f "Silent-installer_input-osx.txt" /tmp/Silent-installer_input-osx.txt

./install -inputFile "/tmp/Silent-installer_input-osx.txt" >> "{parameter "logFolder"}/{parameter "logFile"}" 2>&1

Your issues are not so much with BigFix but a combination of other factors and how your going about it. There is definitely a learning curve to BigFix, but not many limitations.

I don’t understand why you were doing this:

copy __Download\installer_input.txt "C:\Program 
Files\MATLAB\installer_input.txt"

There shouldn’t be a reason to copy it to that location first. It should just be referenced in the __Download folder instead.

I’m fairly sure that the copy command failed because the MATLAB folder didn’t already exist.

Have you been able to successfully install MATLAB silently on the command line without using BigFix? Once you do that, then it is fairly straight forward to adapt that to work with BigFix.

I was doing the copy part because the silent install file is at the root of the download package. that doesn’t seem to work, though. Pre-creating the MATLAB folder didn’t make a difference, the copy still didn’t work. I can install MATLAB remotely/silently via PSExec.

psexec.exe \COMPUTER -u DOMAIN\user cmd.exe
COMPUTER>net use U \server\share
COMPUTER>u:
COMPUTER>cd MATLAB
COMPUTER\MATLAB>setup.exe -inputFile installer_input.txt

That all works. I can do silent installs interactively for both PC and Mac. Bigfix can’t. Even stepping through the entire install process, one step at a time, until it all works didn’t matter.

1 Like

If you use BigFix to write out a batch file it will make testing the action script easier because you won’t be dealing as much with the bigfix action abstraction and more so with the underlying windows platform that you know is working.

BigFix can definitely install MATLAB.

The only reason I can see that the following line would fail:

copy __Download\network.lic "C:\Program Files\MATLAB\network.lic"

Is because __Download\network.lic doesn’t exist or C:\Program Files\MATLAB\ doesn’t exist.

This should work if the file is in the download folder:

waithidden __Download\setup.exe -inputFile "{ download path "installer_input.txt" }"

Also, try this:

waithidden cmd /C __Download\setup.exe -inputFile __Download\installer_input.txt

Sometimes things work better if you put cmd /C in front


Since you are having so many issues, it might be better to copy everything into C:\Windows\Temp and run it from there using a BAT file as @strawgate mentions.

__Download\network.lic should exist because it is at the root of the download directory, along with setup.exe. Creating the MATLAB folder beforehand offers no change, it still does nothing. I know IEM will not overwrite files, but it has no qualms about deleting them. I’ll try the suggestions.

Many thanks for your help!

Couple of other things to look at. BES Client is a 32-bit program so you can have issues redirecting between Program Files and Program Files (x86). The statement copy __Download\network.lic "C:\Program Files\MATLAB\network.lic" might actually put the file at C:\Program Files (x86)\MATLAB\network.lic (or fail because the x86\Matlab folder doesn’t exist). You can avoid that by using

action uses wow64 redirection false

earlier in your action.

I’m not familiar with "{ download path "installer_input.txt" }", where I need that I usually reference instead "{pathname of download file "installer_input.txt"}", so you can check whether that makes any difference.

One thing is for certain, given the amount of time I have wasted trying to get IEM to do this, I could have easily visited each computer and manually performed the install

Probably true, but it’s likely that you’re just hitting on the learning curve, and once you figure out the problem it will be helpful for deploying other products too.

1 Like

I had to punt, and just do this all manually. I needed to get it done. I didn’t have any more to try and figure out how to get BigFix to do this. It really shouldn’t be this difficult.

1 Like

Thanks for the follow up. Sorry it was such a headache.

I’ve never built a Matlab fixlet/task myself, so I don’t have one to share, but it would be useful if someone else who has would do so, at least the key parts of the actionscript and relevance with the organization specific parts like serial numbers or servers redacted.

BigFix definitely has a learning curve, but it gets easier over time and the ROI is significant, though not everything is equally easy to implement.

Sorry to dredge up an old thread, but I just installed Matlab from BigFix myself. I put the entire Matlab installation folder, along with the installer_input.txt and network.lic on a hidden network share, and set the share permissions to Everyone Full Control, and the folder permissions to the System with Full Control, and Authenticated Users to Read. The task consists of only:

wait \path\to\matlab$\setup.exe -inputFile \path\to\matlab$\installer_input.txt

The installer_input.txt also had \path\to\matlab$\network.lic as the network license. It’s worked several times, no problem. Just throwing this out there, in case you still have issues with it.

Thanks for adding to this! One thing that did help me was to extend the amount of time BigFix waited for a return from the installer. I believe the default tops out at around 5 minutes. MATLAB takes close to 45 minutes to install on my machines. Setting a wait time of 60 minutes allowed MATLAB to perform a complete install, successfully. Yay!!! I dread doing it again for an updated version.