title: Microsoft Installer command line string parameter not working?
body: <p>So I am trying to run a quite installation, with my msi, and it seems like I can easily pass a number for a parameter that I have, but I can't seem to pass in a string...I tried using single quotes ' and double quotes "</p>
  
  <pre><code>msiexec /i 'My Installer.msi' /quiet JREPATH="c:\\BLA BLA"
  </code></pre>
  
  <p>This and also the single quotes return this :</p>
  
  <p><a href="https://i.stack.imgur.com/vlcQ6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vlcQ6.png" alt="enter image description here"></a></p>
  
  <p>Now according to this article : <a href="https://docs.microsoft.com/en-us/windows/desktop/msi/command-line-options" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/windows/desktop/msi/command-line-options</a></p>
  
  <p>it should work...</p>
  
  <blockquote>
    <p>Property values that are literal strings must be enclosed in quotation
    marks. Include any white spaces in the string between the marks.</p>
    
    <p>msiexec /i A:\Example.msi PROPERTY="Embedded White Space"</p>
  </blockquote>
  
  <p>There is no problem with the MSI, I assume this because if i pass a number..it works...</p>
  
  <pre><code>msiexec /i 'My Installer.msi' /quiet JREPATH=3
  </code></pre>
  
  <p><strong>LATER EDIT:</strong></p>
  
  <p>It seems that the problem appears when I have a <strong>space</strong> in the value of the parameter..for example something like the example below works :</p>
  
  <pre><code>msiexec /i "WKFS ReportGenerator.msi" /quiet JREPATH="c:\\;;BLA"
  </code></pre>
  
  <p>This however doesn't:</p>
  
  <pre><code>msiexec /i "WKFS ReportGenerator.msi" /quiet JREPATH="c:\\;;BLA a"
  </code></pre>
  
  <p><strong>LATER EDIT 2:</strong></p>
  
  <p>These commands including spaces in the value <strong>work</strong> if using a simple cmd instead of PowerShell..</p>