I would like to include the time and date the script was executed. So far I have the user name of the person executing that script ....
set FSO = wscript.CreateObject ("Scripting.FileSystemObject") NewTextFile = FSO.OpenTextFile ("UserInfo .flag", 2, true) Set WshNetwork = WScript.CreateObject ("WScript.Network") WScript.Echo "UserName =" & amp; WishNetwork.UserName NewTextFile.WriteLine ("site replication was executed by the end user:") NewTextFile.WriteLine (WshNetwork.userName) NewTextFile. Close NewTextFile = nothing set FSO = nothing
You probably want a statement now
NewTextFile.WriteLine (now)
Or, if you do not want the time, use the date
Comments
Post a Comment