title: How to construct WMI query
body: <p>I'd like to find results that Name starts with param1, and ends with param2 but my code doesn't work</p>
  
  <pre><code>string wmiQuery = string.Format("SELECT CommandLine FROM Win32_Process WHERE Name LIKE '{0}%' AND Name LIKE '%{1}'", param1, param2);
  ManagementObjectSearcher searcher = new ManagementObjectSearcher(wmiQuery);
  ManagementObjectCollection retObjectCollection = searcher.Get();
  </code></pre>
  
  <p>What's wrong?</p>
  
  <p>For comparision</p>
  
  <pre><code>string wmiQuery = string.Format("SELECT CommandLine FROM Win32_Process WHERE Name LIKE '{0}%'", param1);
  </code></pre>
  
  <p>works well</p>