Silent Installation. Runs as a background task? Microsoft Deployment Toolkit (MDT) Task Sequences

31 visualizaciones (últimos 30 días)
Hi, I've used the Matlab silent installation method with some success with MDT
..But it seems that this runs as a background task. With MDT and deploying this as an Application task sequence (TS) the program signals its finished before it actually has. Monitoring the log file with get-content -wait {logfile} it continues running after the the TS thinks its completed.
This wouldn't be too much of an issue but if the TS gets a reboot or does something else before its done, then the install is incomplete.
Perhaps getting it to display a progress bar might be a way but there doesn't appear to be a field for that in the installer file.

Respuestas (1)

Maneet Kaur Bagga
Maneet Kaur Bagga el 20 de Nov. de 2024 a las 3:54
Hi,
As per my understanding, MATLAB's silent installer runs asynchronously, so MDT treats the task as completed when the installer is launched, not when it actually finishes.
Please refer to the following as possible workarounds for the same:
  • Monitor Process Completion: Modify the Task Sequence to wait for the MATLAB installation process to finish before proceeding. For example, in the TS use PowerShell to check if the MATLAB installer (setup.exe) is still running.
while (Get-Process -Name "setup" -ErrorAction SilentlyContinue) {
Start-Sleep -Seconds 5
}
  • Force Synchronous Execution: Run the MATLAB installer using a wrapper script that blocks until completion. For example create a PowerShell script that launches the installer and waits for it to finish as shown in the code snippet below:
Start-Process -FilePath "setup.exe" -ArgumentList "-inputFile silent_installer_input.txt" -Wait
  • Add a Manual Delay: If precise monitoring is not possible, estimate the installation duration and add a manual delay to the TS using a PowerShell script:
Start-Sleep -Seconds 600 # Adjust based on installation time
  • Modify the Silent Installation Configurations: While the MATLAB silent installer doesn't have an explicit progress bar option, you could redirect logs to monitor installation status and include it in your TS checks.
setup.exe -inputFile silent_installer_input.txt -log logfile.txt
I hope this resolves your query!
  1 comentario
Andrew Gavriluk
Andrew Gavriluk el 20 de Nov. de 2024 a las 10:58
Editada: Andrew Gavriluk el 20 de Nov. de 2024 a las 10:59
Hi, thanks. Really appreciate your answer.
I've yet to revisit this but I was thinking along the lines of using get-content on the logfile and looping it until it sees the installation complete message.
The second one looks the most elegant.
In my own setup I had put the Matlab installer at the beginning as some of the programs that install afterwards take a very long time so the issue didn't arise but the system managed by another team installs a lot faster and I was only getting partial installs.

Iniciar sesión para comentar.

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Productos


Versión

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by