Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

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

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 covers it: run a Windows Command Prompt, and type your command into that instead.

Become a Patron of Ask Leo! and go ad-free!

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, text editors, 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 thing that can be displayed on the screen are characters. Character mode explicitly does not support pictures or graphics of any kind.

MS-DOS, the pre-cursor to Windows, was built using a character-mode user interface.

The command line

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

Instead, you typed in certain 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 takes a look 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, though old timers often call it the “DOS box.”

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

The window you’re seeing flash up 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 you asked it to run, and determined it to be a character-mode program.
  • Windows automatically started up the Windows Command Prompt.
  • The program ran within the Windows Command Prompt.
  • The program finished — quickly — and exited.
  • Windows automatically 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.

Command Prompt is also the answer

Hold down the Windows 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.

Now, run the Windows Command Prompt. You can once again use Windows key + R, and enter “CMD” followed by clicking OK, or you can locate the Windows Command prompt in the Start menu.

The Windows Command Prompt

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

Now, 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. When run from Start-Run, this message was lost, as the Command Prompt was automatically opened and quickly closed when SFC finished. By starting your own Command Prompt, you control when the window closes.

In this 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.

The common cause and solution

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.

Do this

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

I'll see you there!

Podcast audio


18 comments on “When I Use Start-Run, Why Does a Window Just Flash and Disappear?”

  1. CMD works with Windows XP and NT but if you have an earlier version of Windows (95, 98, ME) you need to type in COMMAND. Am I showing my age or what ;)

  2. I used to go to start >Run >CMD when I had a problem with my internet. Now when I do that, it says CMD is not a valid WIN32…. so I typed COMMAND instead of CMD and my prompt popped open. Why does the CMD not work anymore and COMMAND does? I have windows 2000 professional.

  3. Sounds like CMD.EXE has become corrupt. In your shoes I’d locate it, and grab a fresh copy of it from your installation disks. I’d also make sure to run anti-virus and anti-spyware scans – sometimes they can corrupt these files.

  4. I use Win XP. I have a lil problem. When I try to run MS DOS Prompt it just flasheds and disappears. I have even reinstalled the CMD file in System32 folder…same results.

    Please help.

    Furthermore I have installed Norton Anti Virus-2004 ..but when I try to open it for the exe file nothing happens…

  5. When I use Start-Run and type in cmd, I get a quick flash of the command prompt and then it disappears. When I type out “command” instead of cmd it works. It hasn’t always been like this. Any ideas? Same with all the shortcut commands like regedit, ipconfig…none of them work…

  6. I had an issue in past where malware dropped .com’s of the same name as the dos utilities we try to run through Windows Run.
    If you did not use the full filename, (i.e. services.msc, or SFC.exe) then the malware .com would run instead and in most cases make a screen appear and dissapear or appear to do nothing at all.

  7. I have tried what you said:
    Start>Run>CMD>sfc>/scannow and I get the message
    “/scannow is not recognized as an internal or external command, operable program or batch file”

    It’s a single command you enter into the Windows Command shell like so:

    SFC /scannow

    Note that there’s a space between SFC and /scannow

    – Leo
  8. Hello Leo, at the moment I can only get my computer (Windows XP Home Edition) to work in safe mode, which only has a black screen, and the command prompt. I obviously have other issues, but I thought I would try SFC to see if I have any errors that could be fixed. The problem I get is this error comes up:
    error code is 0x000006ba [The RPC server is unavailable.]
    How can I fix this problem, remember in safe mode I only have a black screen and the CMD window to work with.

  9. Good grief, I’m shocked that nobody knows about cmd /k

    Generally, when pasting a command into Start -> Run, the shell interface (the black box) will vanish quickly, as soon as the command is completed. This is usually fine. Or if you want feedback, you can open one with ‘cmd’ as noted here, and then type everything by hand. But sometimes you want to type some long, complex line (like Vista’s “netsh int tcp set global chimney=enabled” line) but also see the result – in that case, simply prefix your command with “cmd /k” and then press enter.


    Start -> Run

    cmd /k ipconfig /all
    cmd /k netsh int tcp set global chimney=enabled
    cmd /k ping

    The /k switch prevents the cmd window from closing (killing itself).

  10. In my case, the command prompt window appears just a second and disappear, even with cmd /k.
    In fact this was due to the virus “cradle of filth”, wich created the key “HKLMSoftwareMicrosoftCommand ProcessorAutoRun” with value “exit” into the registry. So the solution was just to delete this key.

  11. OK, I followed your article & did what it said to do, but after I did the sfc/scannow, my computer did some type of scan & when it was done it did not tell me anything. It only had:
    c:documents and settingsme>sfc/scannow
    c:documents and settingsme>
    It gave me no other information & my USB still doesn’t recognise my camera nor does my drive recognise any DVD’s. An hour glass will appear on my desktop for a moment then disappear, it doesn’t automatically pick it up like it used to & I can’t download pictures anymore. Yes, I am using Windows XP. Any help will be greatly appreciated. Thanks.

  12. Very informative article, but I ran the scan and after it was done then the window just closed with no info. Also, as a separate (but possibly related) issue, I keep getting an occasional pop-up that says bwh.exe has failed and needs to close (or something to that effect). Is bwh.exe a virus?

  13. >I tried the SFC command in the dos screen, but >mind keeps coming up and saying:
    >” I need to be an administrator and run it in a >console session in order to use the sfc >setting ”

    >i dont know why when its my computer and i am >the owner?

    >any help would be a great help Leo.
    >thanks Kev

    It may mean that you are using Vista and your UAC (user account control) is turned on for security reasons. Please disable it temporarily and try again. Hope it helps.

  14. I’m still having problems. It keeps on telling me that I must be an administrator running a console session in order to use the utility. What Am I to do now

    You are running Windows Vista or Windows 7. You should right-click on the link that you used to start the command shell and select “Run As Administrator”. Requires Elevation – What does that mean and what do I do? and perhaps How do I get a pinned taskbar item to run with administrative privileges in Windows 7?


  15. Thanks Leo. I was forgetting to do the cmd followed by the command.
    I was referred to use cmd /k netstat on another site. Just listed connections.

  16. Thanks, Leo. That was exactly what I needed. Earlier I was checking to see if I had the DNS changer malware and following the directions at When I entered “ipconfig /all” as instructed at one point the window opened and showed me the IP numbers I needed. I had to close the window to make it go away. Had several docs open at the time. Later, with nothing else running, I again used “ipconfig /all” to confirm some of the information I had written down from the first time but could only get the window open for a very quick flash. Thanks for the explanation and the tip I needed.

Comments are closed.