title: Run a local bat file from javascript with HTA
body: <p>I made a <code>.bat</code> file and I wish to run it with a link's url as parameter using Javascript. </p>
  
  <p>This is what I have:</p>
  
  <pre><code>browser.contextMenus.create({
    id: "downloader",
    title: "Download reference",
    contexts: ["link"]
  });
  </code></pre>
  
  <p>this is for registering a Firefox context menu element and</p>
  
  <pre><code>browser.contextMenus.onClicked.addListener(function(info, tab) {
    console.log("clicked on meh yo");
    if(info.menuItemId === "downloader"){
      // adding a new script element
      var filename = info.linkText;
      var fileurl = info.linkUrl;
      var x = document.createElement("SCRIPT");
      x.setAttribute("language", "VBScript");
      // calling a vbscript that will call my bat file with the parameters
      var t = document.createTextNode("Set WshShell = CreateObject(\"WScript.Shell\");WshShell.Run \"C:/Users/name/Documents/Commands/get-content.bat " + fileurl + " " + filename + "\"");
      x.appendChild(t);
      document.body.appendChild(x);
      console.log("ref was saved yo");
    }
  });
  </code></pre>
  
  <p>The HTA script is in a form of a simple text which is added to the website's original html. </p>
  
  <p>Note this is a tool for myself, it has to work only on my machine. </p>
  
  <p>The problem is that I get the console logs but nothing happens. I tested my bat file (using cmd) and it works fine so the problem should be with my javascript here. </p>