title: wmic call in python return invalid query error
body: <p>I'm trying to create a python executable that will run multiple wmic calls to check the versions of portable executables. </p>
  
  <p>The following code works in the command prompt, so I attempted to run the same line from python</p>
  
  <pre><code>wmic datafile where name="C:\\Program Files\\Internet Explorer\\iexplore.exe" get Version /value 
  </code></pre>
  
  <p>Python Code:</p>
  
  <pre><code>import subprocess
  
  spath = r'C:\Program Files\Internet Explorer\iexplore.exe'
  cargs = ["wmic","datafile","where", r'name="{0}"'.format(spath), "get", "Version", "/value"]
  
  process = subprocess.check_output(cargs)
  </code></pre>
  
  <p>I get the following error</p>
  
  <pre><code>---------------------------------------------------------------------------
  CalledProcessError                        Traceback (most recent call last)
  &lt;ipython-input-59-3271c59ed48f&gt; in &lt;module&gt;()
  ----&gt; 1 process = subprocess.check_output(cargs)
  
  c:\users\jhsiang\appdata\local\programs\python\python35\lib\subprocess.py in check_output(timeout, *popenargs, **kwargs)
      624 
      625     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  --&gt; 626                **kwargs).stdout
      627 
      628 
  
  c:\users\jhsiang\appdata\local\programs\python\python35\lib\subprocess.py in run(input, timeout, check, *popenargs, **kwargs)
      706         if check and retcode:
      707             raise CalledProcessError(retcode, process.args,
  --&gt; 708                                      output=stdout, stderr=stderr)
      709     return CompletedProcess(process.args, retcode, stdout, stderr)
      710 
  
  CalledProcessError: Command '['wmic', 'datafile', 'where', 'name="C:\\Program Files\\Internet Explorer\\iexplore.exe"', 'get', 'Version', '/value']' returned non-zero exit status 2147749911
  </code></pre>
  
  <p>The command at the end of the error message looks correct to me. Where am I going wrong?</p>