Version 12 of start

Updated 2003-09-21 13:50:06

[Refer to Microsoft documentation.]

MS-DOS shell built-in command called with a filename that invokes the executable associated with the filename's extension. Acts about like double-clicking on a file in File explorer. Usage example from Tcl:

 eval exec [auto_execok start] "" [list [file nativename $filename]]

which, if filename ends e.g. in .htm, calls up IE (if that's your default browser); Win Word for .doc, etc.

Nits: If the first parameter is quoted, "start" will take it for a window title. Add an empty string to avoid the problem. COMMAND.COM, CMD.EXE and the console command-line tools misunderstand "/" in filenames. Use [file nativename] to cure that.

[Use in invoking browsers.]

To launch a Windows application (such as Tk) from a console application (such as Tcl) in such a way that it returns only after the subprocess has terminated, use

      start /w wish83 myapp.tcl

As with most Windows command-line tools, see "start /?" from a command prompt for built-in help.

schlenk One caveat usually found the hard way, is the simple fact, that Microsoft found it amusing to implement start differently on Win9x and on Win2k/XP. So read its documentation before you use it. Try to start something like this on W95 and W2k an see what happens:

 start "c:\program files\tcl\bin\wish84" myapp.tcl

Hint (this works on W2k):

 start "" "c:\program files\tcl\bin\wish84" myapp.tcl

[what category]