' Copyright (C) 2007 TechHit. All rights reserved. ' ' THIS SCRIPT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ' Option Explicit Dim fso, fileMessageList, wshShell, strLine Set wshShell = WScript.CreateObject("WScript.Shell") ' Retrieve values from the environment variables, ' putting quotes around the values and commans between them. strLine = wshShell.ExpandEnvironmentStrings("""%TH_SENDER_NAME%"",""%TH_SENDER_EMAIL_ADDRESS%""") ' Open the file, creating if it does not exist, and write the line into it. Set fso = CreateObject("Scripting.FileSystemObject") Set fileMessageList = fso.OpenTextFile("c:\my_senders.csv", 8, True) ' Write a line to the file fileMessageList.WriteLine strLine ' Close the file fileMessageList.Close Set fileMessageList = Nothing Set fso = Nothing Set wshShell = Nothing