When I Use Start-Run, Why Does a Window Just Flash and Disappear?

Something happened, but what?

Frustrated when a window just flashes and disappears when you use Start-Run? It’s not an error, it’s how Windows handles certain programs. I’ll explain what’s happening, why it’s confusing, and show you the simple trick that lets you see what’s going on.
Animation of a Command Prompt Windows flashing
(Video: askleo.com)
Question: When I try to use “Start” and then “Run” to run a command the DOS screen flashes momentarily then vanishes. Am I overlooking something obvious?

Not really. It’s only obvious if you’ve been using PCs since before there was Windows, and before there was a GUI.

Start-Run is incredibly useful, but it’s not appropriate for everything. The good news is there’s a simple trick that fixes what you’re seeing.

TL;DR:

Start->Run->Flash

When you use Start-Run for a command that runs in character mode, Windows briefly opens Command Prompt, runs it, and closes it right away, making the window flash and disappear. The fix: open Command Prompt yourself, run the command there, and you’ll see the results.

Two types of programs

The fundamental problem here, if you want to call it that, is that there are two types of programs.

You’re most familiar with programs that sport a Graphical User Interface, or GUI. Your mail program, web browser, word processors, and more all display various graphical user interface components, including fancy icons, colorful images and controls, and just about anything that can be drawn on the screen.

Before there was a GUI, there was what we now call “character mode.” A “character” is a letter, number, or special item, including punctuation marks. The key is that in character mode, the only things that can be displayed on the screen are characters. Character mode explicitly does not support pictures or graphics of any kind.

MS-DOS, the precursor to Windows, used only a character-mode user interface.

Ask Leo! is temporarily Ad-Free!
Help make it permanent by becoming a Patron.

The command line

Without graphics, character mode had no icons to click on to run programs.

Instead, you typed in commands, or the name of the program you wanted to run, pressed Return, and MS-DOS would locate the program and run it. To start the old character-mode version of Microsoft Word, you’d type “Word”, followed by the Enter key, and MS-DOS would run Word.

Windows supports both GUI and character-mode applications. When you run a program, either by double-clicking an icon, selecting a menu item, or using Start-Run, Windows looks at the program, determines what kind it is, and “does the right thing”. For a GUI application, that means “run it normally” in Windows.

For a character-mode application, though, Windows first starts up a character-mode environment for the application to run in, and then runs the program in that environment. That “environment” is the Windows Command Prompt.

When the character-mode program you’ve run exits, Windows automatically closes the Command Prompt it started.

The command line “flash”

The window you’re seeing flash and disappear is a Command Prompt window. What happened is this:

  • You typed your command into Windows’ “Start Run” dialog and clicked OK.
  • Windows located the program and determined it to be a character-mode program.
  • Windows started up the Windows Command Prompt, opening it in its own window.
  • The program ran within the Windows Command Prompt.
  • The program finished — quickly — and exited.
  • Windows closed the Command Prompt window.

The “flash” you’re seeing is just the Windows Command Prompt opening and closing quickly as all that happens in a flash.

It’s easy to make happen. Hold down the Windows Key key and type “R” to bring up the “Run” dialog box. Into that box, type “sfc” to run the System File Checker.

Start Run SFC

Click on OK. You should see a window come up and disappear quickly — in a flash — and not much else.

Command Prompt is the answer

Now, run the Windows Command Prompt. You can once again use Windows Key key + R, and enter “CMD” followed by clicking OK, or you can locate the Windows Command prompt in the Start menu. These days I’m partial to right-clicking the Start menu and clicking on terminal.

The Windows Command Prompt

The Windows Command Prompt is a character-mode interface you can work in.

Now, click in the command prompt, type “SFC” followed by Enter.

SFC in a Command Prompt

You can see that SFC has run, printed a message, and exited. We lost this message when we ran SFC from Start-Run as the Command Prompt was opened and quickly closed when SFC finished. By starting your own Command Prompt, you control when the window closes.

In this specific case, SFC requires that it be run with Administrative privileges enabled. The correct way to do so is to run Command Prompt “as administrator”, and then run the command therein.

Do this

The most common cause of a quick flash after typing a command into Start-Run is that:

  • The program is a character-mode program
  • The program reported an error of some sort, and immediately exited

The solution is to run a Windows Command Prompt and type the original command into the resulting command-prompt window. In fact, if you know you’re about to run a character-mode program, it’s probably best to do that and avoid “Start-Run” completely.

When you’re done, type the command “Exit” to exit Command Prompt, or simply click on the close box in the upper-right corner.

Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.