For this example, the event script is called Phase1StartNowEnd.VBS and is located in the Scripts subdirectory of the service installation directory.
Set objArgs = WScript.Arguments
set fso=CreateObject("Scripting.FileSystemObject")
set logfile=fso.OpenTextFile ("C:\MyDir\Policies.txt",8,True)
logfile.WriteLine "Policy completed"
logfile.WriteLine Now
logfile.WriteLine objArgs(0)+ " messages were found"
logfile.WriteLine "The XML results can be found at " + objArgs(1)
logfile.WriteLine
logfile.Close
set logfile=Nothing
set fso=Nothing
set objArgs=Nothing
It will write this form of output to the file "C:\MyDir\Policies.txt":
Policy completed
4/4/2006 10:00:22
7 messages were found
The XML results can be found at \\balin\Addins\
AOnePol\PolicyData\RunOnce\bigarchive$060404100015.csv