Hi,
Use trace instead of debug. Add a textwriterlistener to the
trace listeners.
Dim fs As New System.IO.FileStream("C:\Test.txt", IO.FileMode.Append)
Dim myTextListener As New TextWriterTraceListener(fs)
Trace.Listeners.Add(myTextListener)
Dim environmentVariables As IDictionary =
Environment.GetEnvironmentVariables()
Dim de As DictionaryEntry
For Each de In environmentVariables
Trace.WriteLine(String.Format(" {0} = {1}", de.Key, de.Value))
Next de
Ken