title: Using dual criteria with wmic and trying to create a batch file var
body: <p>So I am trying to create a variable from the output of the below command in a batch file. It works fine at the command prompt where I get the process ID 1292:</p>
  
  <blockquote>
    <p>C:\Documents and Settings\user>wmic process where (name="cmd.exe" and CommandLine like "%%%queue%%%") get ProcessID</p>
  </blockquote>
  
  <p>Which Returns</p>
  
  <pre><code>ProcessId
  1292
  </code></pre>
  
  <p>if I do this I get the return I need if only one instance is running:</p>
  
  <pre><code>for /f "tokens=*" %%f in ('wmic process get processid /value ^| find "="') do set "%%f"
  echo processid is %processid%
  </code></pre>
  
  <p>However, I would like to use the multiple content combo because if I want to get the processID for an exe that is running multiple times, at least I can narrow it down. </p>
  
  <p>Any suggestions would be appreciated. </p>