vbscript - insert date and time stamp, vbs -


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

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -