title: Python Subprocess to delete reg key on Windows
body: <p>My code doesn't work as expected :</p>
  
  <pre><code>import subprocess
  
  key = 'reg delete HKEY_USERS\S-1-5-21-2637495828-1099793317-3825703309-1000\SOFTWARE\Classes\CLSID\{0E270DAA-1BE6-48F2-AC49-D955BE4EEF1D} /f'
  subprocess.call(key, shell=True)
  </code></pre>
  
  <p>Running Windows 10 64b, tried with subprocess.Popen aswell.</p>
  
  <p>My first thought is I have to escape \ somehow, but I'm not sure if that's what I need, nor how to do it.
  I also tried to make it work with a list of args <code>key = ['reg', 'delete', 'HKEY...'])</code>, which gave the same result</p>
  
  <p>Result from python script</p>
  
  <pre><code>C:\test.py
  Error : Couldn't find the key or registry value
  </code></pre>
  
  <p>Result from the command from the Windows prompt</p>
  
  <pre><code>C:\reg delete HKEY_USERS\S-1-5-21-2637495828-1099793317-3825703309-1000\SOFTWARE\Classes\CLSID\{0E270DAA-1BE6-48F2-AC49-D955BE4EEF1D} /f
  Operation Suceeded
  </code></pre>
  
  <p>N.B. I exported the key so I can add it again after every successful try.</p>
  
  <p>N.B. Windows return messages were translated, and may not be accurate.</p>