|go ahead... be a heretic|
Automating program use logging on Win32by c4onastick (Friar)
|on Mar 17, 2008 at 23:47 UTC||Need Help??|
c4onastick has asked for the
wisdom of the Perl Monks concerning the following question:
Greetings fellow monks!
Today was a most joyous occasion for me, I was actually asked to implement some sort of digital logging mechanism to track instrument usage! (That may not sound like much, but technology is terribly underutilized at this company.) I'm just a scientist with a programming hobby so this means that all the time I've spent meditating here at the monastery has helped me get to a place where I'm actually asked to tackle these sorts of problems so I humbly thank all of you for your guidance over these years. It also means that the seed of change has been planted and they are starting to realize that a computer can be more than just a giant typewriter!
Unfortunately, this wont be easy. I've tried to automate other parts of the software in question before with little success (Collecting data from a program that doesn't make it easy). What would be ideal would be to record the start time and end time of the instrument's operation and maybe a few other details (who's running it, what study, etc.). My initial thought was to write a little bat script to call a little perl program to log the time, user, study etc. then call the instrument's software. (Maybe even bracket that with another script to record the time the software is closed, assuming it's closed when it's done being used.)
The downside of that is I'd have to install and maintain perl on quite a few machines (not terrible, I agree, but laziness is a virtue). I do, however, have access to all the data directories over the network. So, what I'm wondering is if there is another, less obtrusive way to log usage, say perhaps by monitoring the data directory for new files and logging the creation and last modification time? Has anyone run into similar problems on Win32? Any thoughts on alternate ways to tackle this problem?
Thanks in advance!