(After browsing the list of Stack Exchange communities, superuser seemed like the most fitting. Please tell me if this should belong elsewhere.
I also tried searching this community for similar questions, but could not find any. Please also tell me if I missed one that deals with the same issue.)
I have a Lenovo computer running Windows 10 Home. A while back I noticed that a .bat file would sometimes execute spontaneously. I notice it because a cmd prompt window pops up (in front of whatever I'm working with at the moment) and directly shuts down again, the way a .bat file does when it just executes commands/does whatever and there is no info to show to the user.
I noticed that there was a point in time when this started, but there was no obvious correlation with anything I installed around that time.
My question is this: is there a way to log which .bat files are executed (or similar)? Then I could, when I notice the cmd prompt popping up and disappearing I could just go into that log and see which files were recently executed.
tl;dr I am looking for a way to log all executions of .bat files, in order to identify an intermittently executing one.