Batch file history

Is there a way to find out when a batch file was ran?  Is there a history log?
gloyola1Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
MysidiaConnect With a Mentor Commented:
You can alter a .BAT file  to include the generation of a history record or log entry, as one of the extra things the script does, every time the file is run.     But there is no log or history of someone manually running the batch file.

On the other hand, if run using a Windows scheduled task:

There is such a thing as a log of executed scheduled tasks in Windows: http://technet.microsoft.com/en-us/library/cc783861(v=ws.10).aspx


You can also setup security auditing for Read/Execute access on the file,
and turn on 'Object Auditing' of success events using Windows Group policy,
and then review the Windows security log for audited events against the file;
however,  these steps require additional preparation,

and  do not distinguish running from opening the file in notepad.
0
 
John HurstConnect With a Mentor Business Consultant (Owner)Commented:
No, not unless you make one.

You need to add a line in your batch file to copy some text to a file. Do this as the last line.  The line would look like:  echo 123 >> c:\temp\file1
0
 
gloyola1Author Commented:
Thanks
0
All Courses

From novice to tech pro — start learning today.