How can I write text files using WScript I'm really new on this that's why I cannot give some details. I want to write a log file that can be stored in c://users/user/appdata/local
my sample code, using FileSystemObject
function WriteFile()
{
var fso = new ActiveXObject("Scripting.FileSystemObject");
var fh = fso.CreateTextFile("d:\\Test.txt", true);
fh.WriteLine("Some text goes here...");
fh.Close();
}
<body onload = "WriteFile();">
</body>
it does return in d: but in local c: it wont.