title: Script to check if printer exists locally, and if so, deletes it
body: <p>I'm writing a windows batch file and need to check whether the print exists on the local computer, and if so, deletes the mapped printer from the computer. Here is the code that I'm using to delete the printer.</p>
  
  <pre><code>RUNDLL32 printui.dll,PrintUIEntry /n \\server\printerName /dn
  </code></pre>
  
  <p>This works fine, but now I need a conditional statement before this so I check if that printer exists first. Then run that line. I'm not sure how to write this.</p>