title: Javascript Windows Logoff - logoff.exe
body: <p>I'm developing an HTA file and i"m trying to create a link in wich the user will be logged off when clicked. </p>
  
  <p>My function:</p>
  
  <pre><code>function fn_fecha()
  {
  WshShell = new ActiveXObject("WScript.Shell");
  WshShell.Run("C:\\Windows\\System32\\logoff.exe");
  }
  </code></pre>
  
  <p>and the call:</p>
  
  <pre><code>&lt;tr&gt;
  &lt;td WIDTH=300&gt;
  &lt;/td&gt;            
  &lt;td&gt;
  &lt;a id=hsair href="#" onclick="javascript:fn_fecha"  &gt;SAIR&lt;/a&gt;
  &lt;/td&gt;               
  &lt;/tr&gt;
  </code></pre>
  
  <p>I've tried both the function with just one "\" (c:\windows\system32\logoff.exe) and the function with fn_fecha(), but it does not find the file when i do this.
  The HTA file is hosted on a server (but is not open via IIS).</p>