If we have Unicode in the XML data then create_file = "y" will fail when writing the data: [code]Creating output File Output file: computer.txt Problem writing to file. Error Number:5 Error Description:Invalid procedure call or argument[/code]
We need to [url=http://msdn.microsoft.com/en-us/library/314cz14s%28v=vs.84%29.aspx]open the text file as Unicode[/url].
[code] --- audit_windows.dist Mon May 20 13:35:48 2013 +++ audit_windows.vbs Thu May 30 10:27:20 2013 @@ -175,0 +176 @@ +Const TristateTrue = -1 @@ -470 +471 @@ - set objTS = objFSO.OpenTextFile(OutputFile, FOR_APPENDING, True) + set objTS = objFSO.OpenTextFile(OutputFile, FOR_APPENDING, True, TristateTrue) @@ -6034 +6035 @@ - set objTS = objFSO.OpenTextFile(OutputFile, FOR_APPENDING, True) + set objTS = objFSO.OpenTextFile(OutputFile, FOR_APPENDING, True, TristateTrue)[/code]
|