Silent Installation. Runs as a background task? Microsoft Deployment Toolkit (MDT) Task Sequences
Show older comments
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.
Answers (1)
Maneet Kaur Bagga
on 20 Nov 2024
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!
2 Comments
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!