title: Passing msiexec switches through vbscript
body: <p>I'm trying to silently install MSI packages through a vbscript but when I try to pass switches through all I get is the blank command prompt and the Windows Installer tooltip opens.</p>
  
  <p>Here's a couple ways I've tried this below, but I get the same thing each time.</p>
  
  <p><a href="https://i.stack.imgur.com/RUv9H.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RUv9H.png" alt="Windows Installer tooltip that comes up when running script"></a>  </p>
  
  <pre><code>Dim objShell
  Set objShell = Wscript.CreateObject ("Wscript.Shell")
  objShell.Run "cmd /c msiexec" &amp; "/i" &amp; Chr(34) &amp; "AppleApplicationSupport64.msi" &amp; Chr(34) &amp; "/quiet" &amp; "/norestart"
  objShell.Run "cmd /c msiexec" &amp; "/i" &amp; Chr(34) &amp; "AppleMobileDeviceSupport6464.msi" &amp; Chr(34) &amp; "/quiet" &amp; "/norestart"
  objShell.Run "cmd /c msiexec" &amp; "/i" &amp; Chr(34) &amp; "iTunes6464.msi" &amp; Chr(34) &amp; "/quiet" &amp; "/norestart"
  objShell.Run "cmd /c msiexec" &amp; "/i" &amp; Chr(34) &amp; "Bonjour64.msi" &amp; Chr(34) &amp; "/quiet" &amp; "/norestart"
  objShell.Run "cmd /c msiexec" &amp; "/i" &amp; Chr(34) &amp; "AppleSoftwareUpdate.msi" &amp; Chr(34) &amp; "/quiet" &amp; "/norestart"
  Set objShell = Nothing 
  </code></pre>
  
  <p>Second way I tried</p>
  
  <pre><code>Dim objShell
  Set objShell = WScript.CreateObject( "WScript.Shell" )
  objShell.Run("""%userprofile%\Desktop\Deployment\AppleApplicationSupport64.msi""") + "/quiet" + "/norestart"
  objShell.Run("""%userprofile%\Desktop\Deployment\AppleMobileDeviceSupport6464.msi""") + "/quiet" + "/norestart"
  objShell.Run("""%userprofile%\Desktop\Deployment\iTunes6464.msi""") + "/quiet" + "/norestart"
  objShell.Run("""%userprofile%\Desktop\Deployment\Bonjour64.msi""") + "/quiet" + "/norestart"
  objShell.Run("""%userprofile%\Desktop\Deployment\AppleSoftwareUpdate.msi""") + "/quiet" + "/norestart"
  Set objShell = Nothing
  </code></pre>
  
  <p>It doesn't seem to go past the msiexec command. How can I get it to run the entire string together the full command to install the packages?</p>