title: Disable SSNPNotifyEventSetting for all printers with .bat
body: <p>I am trying to write a batch script that will loop through the following registry entry and update the different sub keys:</p>
  
  <p>"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\"</p>
  
  <p>For example:</p>
  
  <pre><code>reg add HKLM\System\CurrentControlSet\Control\Print\&lt;Some Printer&gt;\PrinterDriverData /t REG_DWORD /v SSNPNotifyEventSetting /d 0
  </code></pre>
  
  <p>I need to run that update for each printer installed and I think a FOR statement should be able to.  I am just no good with FOR statements which is why I need help.  This is what I have researched/tried so far:</p>
  
  <pre><code>set var1="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\"
  
  FOR /F "PrinterDriverData" %%F IN ('REG QUERY %var1%') DO REG ADD %var1%\%%F\PrinterDriver\Data /t REG_DWORD /v SSNPNotifyEventSetting /d 0
  </code></pre>
  
  <p>I know this is probably way off, but its as far as I could figure out on my own.  Any help is appreciated!</p>