How to Start a Program From a Command Prompt in Windows

ID: Q126410


The information in this article applies to:
  • Microsoft Windows 95
  • Microsoft Windows 98


SUMMARY

In Microsoft Windows 95/98, you can start a Windows-based or MS-DOS-based program from the command prompt in an MS-DOS window. To do so, type the program's executable filename, or use the START command at the MS-DOS command prompt.

For example, to start ScanDisk for Windows, type "scandskw" (without quotation marks) or "start scandskw" (without quotation marks) at the MS- DOS command prompt.

NOTE: You may use Start.exe to activate a shortcut as well as a program. For example, this may be useful when running an MS-DOS-based program from within a batch file that has specific requirements configurable in the shortcut's properties.


MORE INFORMATION

If you type only the programs's executable filename, Windows 95/98 searches the current folder, and then the folders on the path statement for the executable file. If the file is not found, you receive the following error message:

bad command or filename

If you use the START command, Windows 95/98 searches the current folder, the folders on the path statement, and the registry. If the file is not found, you receive the following error message:
Cannot find file '<filename>' (or one of its components). Check to ensure the path and filename are correct and that all required libraries are available.

The START command is used at an MS-DOS prompt to start an MS-DOS-based or Windows-based program. The program is started as a separate task that can be run in the foreground or background. You can use the START command if you want to keep your current MS-DOS settings, while you run another MS- DOS-based program in the background.

You can use the START command to open files if its extension is a registered file type in Windows. For Example, if you type "start Readme.txt," Notepad is started and the Readme.txt file is displayed.

More information about the START command, type the following command at the MS-DOS prompt:
start /?

The following is a sample of the output when you do so:
Runs a Windows program or an MS-DOS program.

START [options] program [arg...]
START [options] document.ext

/m[inimized] Run the new program minimized (in the background).
/max[imized] Run the new program maximized (in the foreground).
/r[estored] Run the new program restored (in the foreground).

[default]

/w[ait] Does not return until the other program exits.

Additional query words: wwt

Keywords : kbusage win95 win98
Version : 95
Platform : WINDOWS
Issue type : kbhowto


Last Reviewed: January 14, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.