In Windows, is there a log that records what programs were run/called?

While browsing the internet, viewing a static page with no ads, mouse clicks, keypresses, or miscellaneous plugins/addons/scripts running, I just saw a spontaneous CMD.exe console pop open and then immediately close in a flash, fast enough that I wasn't able to see anything in the window -- and with no apparent triggering on my part.

I'm wondering if there is some type of Windows log that shows what programs have been run/called/activated? I'd like to see what was happening behind the scenes when this console window flashed, and hopefully determine it wasn't something rogue.

For reference, I'm running Windows 7 Ultimate x64.

  • Was this on startup or were you installing something?
    – Jan Doggen
    Jun 3, 2013 at 19:53
  • I was merely browsing the internet -- and not even actively so. I was reading a static web page that had already loaded, with no clicks, keypresses, or requests being filed. I'm editing the question now to improve it, as I'm really asking if there is some type of log of program runs/initiations, and specifically, a command prompt. Jun 3, 2013 at 21:01
  • Try to see in the event viewer of Windows.
    – stderr
    Jun 3, 2013 at 21:42
  • @JanDoggen It was in the middle of the day, nowhere near any startups, shutdowns, reboots, or installations. I was just reading in my browser in an already loaded page, with all popups/ads/scripts disabled, with no virus scans/updates scheduled. Additionally, I could see that it was a command prompt window that flashed and then disappeared. Jun 10, 2013 at 5:19
  • 1
    Just faced similar problem and run into your question, have you found out what was that?
    – uncle Lem
    May 30, 2017 at 21:20

4 Answers 4


You will not be able to check what ran, but you can prepare for the next time. If you open secpol.msc you can go to local policies/audit policy. Activate Success (and maybe also Failure) on Audit process tracking and you will get an event log entry in the security event log every time a process starts or ends. Unfortunately you'll see the process that ran but not the command line it was started with.

If you activate the auditing, a lot of logs might get generated, so you should adjust the size of the security event log.

You can access the logs with eventvwr.msc, Windows protocols, Security.

  • If I don't see the command line, then what will I see?
    – Dims
    Dec 16, 2016 at 13:03
  • @Dims If "notepad myfile.txt" was started then you will see "notepad" but not the "myfile.txt". Dec 19, 2016 at 9:10
  • @WernerHenze, Anyway to do this on a home computer? ... Windows cannot find secpol.msc
    – Pacerier
    Dec 26, 2016 at 3:35
  • @Pacerier Which Windows version/edition? Dec 27, 2016 at 8:10
  • where are the logs located? Mar 24, 2018 at 3:13

Mark Russinovich Sysinternals Process Monitor does that. Among tracking file/reg/network accesses, it can track proc/thread lifetime and allows a lot of filtering.

  • 1
    Would this have to have been running to capture a process that opened? Or is it able to report the thread lifetime independent of Procmon's tracking? Jun 5, 2013 at 22:53
  • What "this" is independent of pmon? Do you mean monitoring without the monitor? How do you imagine this?
    – Val
    Jun 6, 2013 at 6:51
  • 1
    What I meant -- would Process Monitor needed to have been running in order to track proc/thread lifetime, or is that globally stored independent of Process Monitor? Jun 28, 2013 at 5:27
  • 2
    Process Monitor is what it says -- a monitor. It is not Windows Log Viewer. It injects some drivers into the windows core functions and logs the calls himslef. You cannot monitor without the monitor. Ok?
    – Val
    Jun 28, 2013 at 5:51
  • 1
    Oops -- I was confusing Process Monitor with Process Explorer -- Process Explorer can see process start/running times without having been active (monitoring) when the respective program was first started. I thought it was Process Explorer you were talking about. Thanks. Jul 4, 2013 at 22:32

It may have been a scheduled task running. Check the Task Scheduler for tasks.

You could also check the Event Viewer for anything, though it probably won't have anything.


Same here Windows 7 Ultimate x64 (Spanish).

I found out that the culprit is: C:\Program Files (x86)\Microsoft Office\root\Office16\officebackgroundtaskhandler.exe

Apparently it is a Know bug.

  • 1
    This is probably not the problem encountered by the original poster, however when I enabled audit logging for processes (as suggested by Werner Herze) it turned out that this was the problem in my case. As of May 2017, this is to be fixed in a future Windows update "soon". If the problem persists after updating Windows (and you are from the future) this is probably not your issue. Jun 1, 2017 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.