You can try using the FileSystem Object (function OpenTextFile or CreateTextFile).
example:
jscript code:
var fso = new ActiveXObject("Scripting.FileSystemObject");
fso.OpenTextFile("c:\test.txt" /*filename*/,2 /*mode;1=reading;2=writing;8=append*/, true /*create if non-existant*/);
To write something in it, use the Write or WriteLine function