Install MATLAB through MS Intune
59 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I'm trying to create an silent installer to be later added to MS Intune, however everytime that I try to install, I am receiving the error "There was an error while extracting product files.Try rerunning the Installer.".
I already performed all the steps described in "https://www.mathworks.com/matlabcentral/answers/1594169-deploy-matlab-with-ms-intune?s_tid=sug_su" but I'm still struggling to make this work.
Below is the "installer_input.txt" content that I used to install, but posted without the fileInstallationKey attribute:
destinationFolder=C:\Program Files\MATLAB\R2024a
fileInstallationKey=REMOVED
agreeToLicense=yes
outputFile=C:\Temp\Matlab_Install.log
enableLNU=no
improveMATLAB=no
licensePath=C:\Temp\network.lic
setFileAssoc=true
desktopShortcut=true
startMenuShortcut=true
createAccelTask=true
Addittionally, this is the log report that I'm receiving while trying to execute it:
(May 23, 2024 09:36:15) ##################################################################
(May 23, 2024 09:36:15) #
(May 23, 2024 09:36:15) # Today's Date:
(May 23, 2024 09:36:15) May 23, 2024 09:36:15 -0300
(May 23, 2024 09:36:15)
(May 23, 2024 09:36:15) System Info
(May 23, 2024 09:36:15) OS: Windows Version 10.0 (Build 18363)
(May 23, 2024 09:36:15) Arch: amd64
(May 23, 2024 09:36:15) Language: pt_BR
(May 23, 2024 09:36:15) Release Description: R2024a Update 3
(May 23, 2024 09:36:15) Installer build number: 24.1.0.2603908
(May 23, 2024 09:36:15) Content of the file installer_input.txt
destinationFolder=C:\Program Files\MATLAB\R2024a
fileInstallationKey=REMOVED
agreeToLicense=yes
outputFile=C:\Temp\Matlab_Install.log
enableLNU=no
improveMATLAB=no
licensePath="C:\Temp\network.lic"
setFileAssoc=true
desktopShortcut=true
startMenuShortcut=true
createAccelTask=true
End of the file installer_input.txt
(May 23, 2024 09:36:15) Session key: REMOVED
(May 23, 2024 09:36:15) Product Files Folder: C:\Temp\MATLAB_r2024a\archives
(May 23, 2024 09:36:16) License Agreement validation is successful.
(May 23, 2024 09:36:16) FIK validation is successful.
(May 23, 2024 09:36:16) Unable to read license file
(May 23, 2024 09:36:16) License File validation is successful.
(May 23, 2024 09:36:16) Folder validation is successful.
(May 23, 2024 09:36:16) Product selection validation is successful.
(May 23, 2024 09:36:16) Confirm Selections
(May 23, 2024 09:36:16) Destination
(May 23, 2024 09:36:16) C:\Program Files\MATLAB\R2024a
(May 23, 2024 09:36:16) Products
(May 23, 2024 09:36:16) 7 of 7 products
(May 23, 2024 09:36:16) 9.35 GB required
(May 23, 2024 09:36:16) Is it an OLL Individual license: false
(May 23, 2024 09:36:17) There was an error while extracting product files.<br>Try rerunning the Installer.<br><br>For help, see this <a HREF="https://www.mathworks.com/pi_siae_mpi_R2024a_win64">MATLAB Answer</a>.<br>invalid conversion: undefined to JSON object
(May 23, 2024 09:36:17) Exiting with status -2
(May 23, 2024 09:36:17) End - Unsuccessful
0 comentarios
Respuestas (2)
Harald
el 23 de Mayo de 2024
Hi,
that's a very specific question. Please consider contacting our Installation Support team:
https://www.mathworks.com/support/contact_us.html --> "Installation and Setup".
Best wishes,
Harald
Gary Fernandes
el 11 de Oct. de 2024
Editada: Gary Fernandes
el 16 de Oct. de 2024
A good solution:
I have found that some installers like the MATLAB installer app, setup.exe, return from executing the setup.exe but actually spawns, starts, a background thread that needs a few more minutes to finish. This can cause Intune issues! For example, Intune thinks the setup.exe has completed and closes the Intune operation before the MATLAB installer background thread has fully completed.
My fix is to continually check the installer log file for "End - Successful". This seems to catch the true installation completion. I could have created an installer .bat file that after the setup.exe returns, has a 5 minute delay command line instead.
NOTES:
(1) My Intune .bat installer first copies the installer folder with all the Matlab files to the C:\MATLAB\R2024a_Installer\ folder.
(2) To create the "R2024a_Installer" folder & files, follow the "mathworks_installation_help.pdf" section "Download Products Without Installing" and specially note the "From the installer, select Advanced Options > "I want to download without installing""
(3) At the end, the installer folder is deleted.
.bat installer below:
-----------------------------------------------------------------------------
REM 9-4-2024 Gary Fernandes
REM Uninstaller: In Intune use this uninstall line: C:\MATLAB\R2024a\bin\win64\MathWorksProductUninstaller.exe --mode silent
@echo off
REM Create the C:\MATLAB folder if it doesn't exist. Alter this line and many of the lines below if you want installed in different location.
if not exist "C:\MATLAB" (
mkdir "C:\MATLAB"
echo C:\MATLAB folder created.
)
REM Set the log file path and name.
set LOGFILE=C:\MATLAB\mathworks_IntuneInstall.log
REM Delete any existing log file quietly from any previous install
del /Q "%LOGFILE%"
REM Copy the XLM7 license pointer file. XLM7 file is my licensing server pointer. Alter this to your own licensing server.
xcopy .\R2024a_Installer\LicenseXLM7Pointer.dat C:\MATLAB\ /Y /V
echo Copied "LicenseXLM7Pointer.dat" to C:\MATLAB.
REM Copy the installer files to C:\MATLAB\R2024a_Installer.
xcopy .\R2024a_Installer\ C:\MATLAB\R2024a_Installer\ /E /H /Y /V
echo Copied installer files to C:\MATLAB\R2024a_Installer.
REM Start the setup.exe file with the specified input file
start /wait C:\MATLAB\R2024a_Installer\setup.exe -inputFile C:\MATLAB\R2024a_Installer\installer_input.txt
echo Started the setup.exe installer with the specified config file installer_input.txt.
REM Wait for the log file to be created and then start to check for "End - Successful"
echo Waiting for the log file to be created...
:waitforlog
if not exist "%LOGFILE%" (
timeout /t 10 /nobreak >nul
goto waitforlog
)
echo Log file found. Checking for "End - Successful"...
:checklog
echo Checking for "End - Successful" every 60 seconds in the log file...
findstr /C:"End - Successful" "%LOGFILE%" >nul
if %errorlevel% equ 0 (
echo "End - Successful" found in the log file.
goto cleanup
)
REM If the message is not found, wait 60 seconds and check again
timeout /t 60 /nobreak >nul
goto checklog
:cleanup
echo Installation completed successfully. Removing "R2024a_Installer" folder...
REM Delete the installer folder
rmdir /S /Q "C:\MATLAB\R2024a_Installer"
echo Installer folder removed.
exit /b
0 comentarios
Ver también
Categorías
Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!