Have you ever gotten to a point where you discover something about your system and wonder when it happened? Something like, when was a particular update installed? Or when did a particular background task start being run? Or did Microsoft change a scheduled job after an update?
For this I run a batch script I wrote called LogSystemInfo every night. I do this on all my systems (Windows 7, 8.1, 10). It creates a log file named for the current date and time and runs several commands to dump out a bunch of important info:
- A list of running processes.
- A list of running services.
- A list of DLL modules loaded by processes.
- A list of all scheduled tasks.
- A list of the states of all the services.
- A list of installed updates.
- A list of boot configuration options.
Voila, if I want to know when something changed or whether all’s the same as before, I just compare log files from different days (I prefer a really nice tool called Beyond Compare for this). The log files are a few hundred kb so they can just accumulate forever. I’ve been running it in various forms since 2010 and have accumulated 2594 log files so far. 🙂
I thought I would share this script with you, along with several GnuWin32 toolkit programs (gsort, sed, grep) it uses to gather and format info, and finally one of my own executables that formats the date and time (ShowTime). I assure you they’re all clean, safe, and legal to redistribute, but I encourage you to scan them with your AV to be sure. Or just look at the commands I run in the .bat file to see how to get a lot of good info.
http://Noel.ProDigitalSoftware.com/files/LogSystemInfo.zip
Unzip all these files into a single folder from which you want to run the script, start an elevated CMD window, CD into that folder, and run LogSystemInfo.bat. It will create a log file with a name like the following in a Log subfolder of your user area, for example:
C:\Users\NoelC\Log\SystemInfo_2017_03_05_01_50_00.log
If you want to schedule this in the Task Scheduler, set up a job that starts at a time when you know your computer will be on, run it from the folder containing the files, and remember to set the [ ] Run with Highest Privileges option, as shown here:
Please let me know if you have any problems. I think I’ve included everything it needs to run.
-Noel