Reputation: 23
I try to automatise my Windows configuration with unattend.xml file and during FirstLogonCommands, I only have SynchronousCommand block,
On theses blocks, i ran differents PowerShell scripts and inside one of them, i try to install .msi file but when msiexec is launch, the other blocks SynchronousCommand start simultaneously as asynchronous command.
But the normal process would be that these step should wait .msi is fully installed before continue their execution.
I already try :
cmd /c /start /wait msiexec myfile.msi
start-process
with parameter -wait
or -noexit
Start-Job -ScriptBlock
with a while while ( ( get-job | where { $_.State -eq 'Running' -and $_.Command -like ('*'+$ScriptName+'*') } ).count -gt 0 )
...cmd /c InstallMsi.bat
None of these manipulations seems to works.
I think the problem is with msiexec execution....
Is anyone having already these issue?
Upvotes: 0
Views: 298