title: Escaping special characters in cmd
body: <p>I have a Windows .bat script in which I try to run a command with password in parameter. The password I want to be able to use is <code>~!@#$%^&amp;*()_+|-=\][{}';:"/.&gt;?,&lt;</code>.</p>
  
  <p>From what I've read <a href="http://ss64.com/nt/syntax-esc.html">here</a>, I should escape <code>^&amp;|\&lt;&gt;</code> with <code>^</code>. From what I assume, I should escape <code>"</code> with <code>\"</code>.</p>
  
  <p>This gives me something like that:</p>
  
  <pre><code>runme.exe /password:"~!@#$%^^^&amp;*()_+^|-=^\][{}';:\"/.^&gt;?,^&lt;"
  </code></pre>
  
  <p>But it doesn't work - my target app responds with logon failure.</p>
  
  <p>How should I escape all these characters to be able to hardcode the password in my batch (ignoring the security issues by now)?</p>