title: Execute less compiler anywhere on the computer
body: <p>Orginial source what I followed: <a href="http://blog.dotsmart.net/2010/11/26/running-the-less-js-command-line-compiler-on-windows/" rel="nofollow">http://blog.dotsmart.net/2010/11/26/running-the-less-js-command-line-compiler-on-windows/</a></p>
  
  <p>I'm having a little problem with executing *.cmd files so I can execute them anywhere on the computer with cmd. 
  What I exactly want is to execute the less.cmd file, which support optional arguments and uses lessc.wsf (Less.js compiler for Windows Script Host) for converting less css to pure css. </p>
  
  <p>The lessc.cmd contains:</p>
  
  <pre><code>::For convenience
  @cscript //nologo "%~dp0lessc.wsf" %*
  </code></pre>
  
  <p>The lessc.wsf contains this: <a href="http://pastebin.com/D4pUSGZ6" rel="nofollow">http://pastebin.com/D4pUSGZ6</a></p>
  
  <p>What I've done so far:</p>
  
  <p>added absolute path to lessc.cmd to the PATH system variable and moved .cmd in the PATHTEXT system variable to the beginning. </p>
  
  <p>Also did this:</p>
  
  <pre><code>From a command prompt; 
  assoc .cmd
  should return with 
  ..cmd=cmdfile
  If not 
  assoc .cmd=cmdfile 
  to restore the default file type association. 
  
  ftype cmdfile
  should return with 
  cmdfile="%1" %* 
  If not 
  ftype cmdfile="%1" %* 
  to restore the default "Open" action for the file type. 
  </code></pre>
  
  <p>This still doesn't work unless I approach the cmd file with a absolute path in cmd, if I enter lessc anywhere else then I get </p>
  
  <pre><code>C:\Intel Intel is not recognized as an internal or external command, operable program or batch file.
  </code></pre>
  
  <p>, I've restarted my computer more than once to be sure changes will take effect.</p>
  
  <p>I hope somebody has the answer. </p>