# Windows Batch Script Program Activity Log?



## noisexkillua (Nov 2, 2011)

Okay I really need help with this, I need help with creating a program activity log for the user from my batch file. I have this code:
@echo off
echo %date%, %time%: Listing a directory. > myfile.txt
dir >> myfile.txt

which is the same format i want but outputs a directory instead of programs. The aim of my batch script is to make a log of the programs the user has executed along with the date and time. Any tips would be appreciated. Thanks!


----------



## Squashman (Apr 14, 2005)

A batch file is not going to be able to monitor the system and log all executables launched on a computer.


----------



## noisexkillua (Nov 2, 2011)

How comes? Its a school project and I need a way to somehow monitor user activities and output it to a word pad of some sort


----------



## Squashman (Apr 14, 2005)

When I worked for a school district we were running Novell Netware with Zenworks and a plugin called Rogue Process management. This plugin allowed us to allow and disallow specific programs from running but it also kept a log of programs that were executed that were not on the allow or disallow list so that we could manually verify what they were and then add them to the allow or disallow list. It worked quite well. But if you are not in this type of environment then it is not going to work for you.

I don't know how to do this in a pure Windows environment without using 3rd party programs like Process Monitor.
Process Monitor


----------

