Assume Microsoft Office is installed. Consider the following batch file:

REM the following line successfully launches Microsoft Word
start winword

REM none of the following commands work to launch Microsoft Word

What is it about the "start" instruction that allows the launching of Microsoft Word using the name "winword"?

My curiosity stems from my interest in the mechanics of the "start" verb - I don't need suggestions on other ways to start Microsoft Office. Please don't suggest that I add the Microsoft Office directory to my PATH environment variable - I know what that would do.

How is start finding "winword" when cmd cannot find it directly?


The App Paths key is evaluated just after PATH if I'm not mistaken:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Winword.exe]
"Path"="C:\\Program Files (x86)\\Microsoft Office\\Office14\\"

That's how both the Start command and the Run dialog recognise Winword.exe as a valid alias. For more, read How is it possible to run Wordpad by just typing its name even though it isn't on the PATH? by Raymond Chen.


It's just not the start, but also the "Run dialog". The secret?

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths

Run dialog and start checks here too. The command line doesn't.


So, the Start method in cmd enables a user to start a SEPARATE window in Windows from the Windows command line. Without the ` method, cmd try to start/launch the defined resources, but without extension, he get it as a directory and so no effect...

Non-executable files may be invoked through their file association just by typing the name of the file as a command.

(e.g. WORD.DOC would launch the application associated with the .DOC file extension).

See the ASSOC and FTYPE commands for how to create these associations from within a command script.`

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.