Thanks to Peter for his link to [link|http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vtoriMicrosoftWindowsScriptTechnologies.asp|the horse's mouth]. I followed some links and eventually found [link|http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/jsobjFileSystem.asp|this], based on which the "print" function was rewritten to:\r\n
\r\nfunction print( msg )\r\n   var fso = new ActiveXObject("Scripting.FileSystemObject");\r\n   var a = fso.CreateTextFile("c:\\testfile.txt");\r\n   a.WriteLine( msg );\r\n   a.Close();\r\n}