title: Use shebang/hashbang in Windows Command Prompt
body: <p>I'm currently using the <a href="https://github.com/visionmedia/serve" rel="noreferrer">serve</a> script to serve up directories with <a href="http://nodejs.org" rel="noreferrer">Node.js</a> on Windows 7. It works well in the MSYS shell or using <code>sh</code>, as I've put node.exe and the serve script in my ~/bin (which is on my PATH), and typing just "serve" works because of it's <a href="http://en.wikipedia.org/wiki/Shebang_%28Unix%29" rel="noreferrer">Shebang</a> (<code>#!</code>) directive which tells the shell to run it with node. </p>
  
  <p>However, Windows Command Prompt doesn't seem to support normal files without a *.bat or *.exe extension, nor the shebang directive. Are there any registry keys or other hacks that I can get to force this behavior out of the built-in <code>cmd.exe</code>?</p>
  
  <p>I know I could just write up a simple batch file to run it with node, but I was wondering if it could be done in a built-in fasion so I don't have to write a script for every script like this?</p>
  
  <p><em>Update:</em> Actually, I was thinking, is it possible to write a default handler for all 'files not found' etc. that I could automatically try executing within <code>sh -c</code>?</p>
  
  <p>Thanks.</p>