title: Javascript Append to Text File
body: <p>I have several JavaScript files that when run return no errors, but do not do what is coded inside them.  This is one of them.  Is there something else I should have installed or enabled on the PC running the .JS files?</p>
  
  <pre><code>function WriteDemo()
  {
     var fso, f, r;
     var ForReading = 1, ForWriting = 2;
     fso = CreateObject("Scripting.FileSystemObject");
     f = fso.OpenTextFile("c:\\testfile.txt", ForWriting, true);
     f.Write("Hello world!");
     f.Close();
     f = fso.OpenTextFile("c:\\testfile.txt", ForReading);
     r = f.ReadLine();
     return(r);
  }
  </code></pre>