Start-Process "msiexec.exe" -arg "/a $MsiPath /qn TARGETDIR=$TargetDirectory"
This line is part of powershell script of msi(say a.msi). While running a.msi it would call the above script, which is expected to extract contents of b.msi($Msipath) to TARGETDIR. But it is not extracting as expected, looks like the above line is not executed at all. Directly when i try to run the above script it is extracting the contents of b.msi as expected. but through msi package it is not working.
I tried removing /qb argument from the above command, and found that it is extracting files now. Since i am calling this script while running a.msi, i am getting a warning "Another installation is in progress. you must complete continuing this one " with Retry and cancel option. When i click on Retry it extracts b.msi and stores in TargetDirectory , on cancel it cancels extracting. So im doubting is it possible to call msiexe.exe when running msi package?
Instead of using msiexec.exe is there any way to extract files from msi?