title: Uninstall an exe from command line or C#
body: <p>I am trying automate the unistallation of a product from Windows using C#.</p>
  
  <p>I tried using </p>
  
  <pre><code>wmic product get name
  wmic product where name="myAppName" call uninstall
  </code></pre>
  
  <p>but my product is not listed in <code>wmic product get name</code> output.</p>
  
  <p>I have an <code>Unistaller.exe</code> file. So I tried calling that exe (using <code>System.Diagnostics.Process</code>) but a confirmation popup appears </p>
  
  <p>"Are you sure you want to uninstall " with Yes/No.</p>
  
  <p>This is NOT UAC</p>
  
  <p><a href="https://i.stack.imgur.com/Ib0wg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ib0wg.png" alt="enter image description here"></a></p>
  
  <p>How to send Yes to the pop up?</p>
  
  <p>Or how can I uninstall this exe programatically? This is not a msi</p>