Occasionally, when certain programs are running/loading something in the background, they throw up a command window briefly as part of the program.. Generally, that shouldn't be happening unless there are automatic updates running for a specific program or in some cases, malware is doing something it shouldn't.
So.... you could check to see if there are any scheduled tasks running which might be causing this. (Type "Task Scheduler" in the Search/Cortana window at the bottom of the screen, open it, then select "Task Scheduler Library". Delete any you don't need.) Also check your various program installations to make sure they are installing new versions of themselves. If that's the case, then things are as they should be.
Or, just for kicks, click on the link below and follow the steps exactly to the letter to scan for spyware and malware.
“Expand” the post titled: "Please try this" at the link below:
http://www.cnet.com/forums/post/f742c795-5881-433b-a29b-6d758efe5cd3/
Hope this helps.
Grif
Hi,
I have recently noticed a small rectangular box that periodically flashes on my screen. It is up for less than a second and it's hardly noticeable unless you are on a dark screen/watching a movie/playing a game. I have therefore been unable to see what it is other than it's shape/colour.
Is there anything that could be causing this? I'm not sure what other information to provide but if you let me know I'll do my best to find out. Thank you!

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic