title: How to store the hostname in a variable in a .bat file?
body: <p>I would like to convert this <code>/bin/sh</code> syntax into a widely compatible Windows batch script:</p>
  
  <pre><code>host=`hostname`
  echo ${host}
  </code></pre>
  
  <p>How to do this so that it'll work on any Windows Vista, Windows XP, and Windows 2000 machine?</p>
  
  <p>To clarify: I would then like to go on in the program and use the hostname as stored in the variable <code>host</code>.  In other words, the larger goal of the program is not to simply echo the hostname.</p>