title: wshshell.run(InstallPath, 0, true) not waiting to finish the installation and continues the script
body: <p>Good afternoon,</p>
  
  <p>I'm working on a project for my company to run an update on the employees workstations. The file is located on a webserver on our domain. The user will click on a link and start up the script.</p>
  
  <p>I made two functions one to download the file to the C:\ and another to run the installer. The file is a .exe (I wish it was a .msi).</p>
  
  <pre><code>'' //executes the file at the location: installPath
  Function launchUpdate(installPath)
      dim wshShell
      Set wshShell = WScript.CreateObject ("WSCript.shell")
      errReturn =  wshshell.run(installPath, 6, true)
  End function
  </code></pre>
  
  <p>I'm using wshshell.run(installPath, 0, true) to execute the file. From what I understand, this should hide the install window and wait until the execution is complete. </p>
  
  <p>It will start it up but it will not wait to complete the install because there are two steps in the .exe. Once the "preparing to install" is done, the script goes on with its job.</p>
  
  <p>I could place Wscript.sleep. However, not all the machine have the same processing speed. So, I will not know how long to wait.</p>
  
  <p>Do you have any suggestion what I could do?</p>
  
  <p>Thank you,</p>
  
  <p>Brian</p>