title: Is there a way to make powershell wait for an install to finish?
body: <p>I have a list of Windows packages that I'm installing via powershell using the following command:</p>
  
  <p><code>&amp; mypatch.exe /passive /norestart</code></p>
  
  <p><code>mypatch.exe</code> is being passed from a list and it doesn't wait for the prior install to finish - it just keeps going.  It builds up a huge window of installs that are pending installation.  Also, I can't use <code>$LASTEXITCODE</code> to determine if the install succeeded or failed.  </p>
  
  <p>Is there anyway to make the installs wait before starting the next?</p>