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.
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 is a character-mode interface that you can work in.
Now, in the command prompt, type “SFC” followed by Enter.
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!
Because of that, I rarely use the Run command. I use the Command prompt cmd.exe which I have a shortcut for on my Taskbar.
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.
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.
when i go to start menu i have no run option?
—–BEGIN PGP SIGNED MESSAGE—–
Hash: SHA1
New article on that:
http://ask-leo.com/where_is_the_run_command_on_windows_start_menu.html
Leo
—–BEGIN PGP SIGNATURE—–
Version: GnuPG v1.4.6 (MingW32)
iD8DBQFGT3CVCMEe9B/8oqERAnYMAJ4lZst7Jz1+6E5/JcBPFp1mp00SyACfbtJD
Pnp2Ds/VvtJVS+ud/jA6YJU=
=IDlK
—–END PGP SIGNATURE—–
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”
Note that there’s a space between SFC and /scannow
15-Dec-2008
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.
Example:
Start -> Run
cmd /k ipconfig /all
cmd /k netsh int tcp set global chimney=enabled
cmd /k ping http://www.google.com
The /k switch prevents the cmd window from closing (killing itself).
>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.
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
21-Aug-2010
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.
Thanks