COMSPEC

From Wikipedia, the free encyclopedia
(Redirected from ComSpec)

Template:Short description Page Template:Mono/styles.css has no content.COMSPEC or Page Template:Mono/styles.css has no content.ComSpec is one of the environment variables used in DOS, OS/2 and Windows, which normally points to the command-line interpreter, which is by default Page Template:Mono/styles.css has no content.COMMAND.COM in DOS,[1] Windows 95, 98, and ME or Page Template:Mono/styles.css has no content.CMD.EXE in OS/2 and Windows NT. The variable name is written in all-uppercase under DOS and OS/2. Under Windows, which also supports lowercase environment variable names, the variable name is defined as Page Template:Mono/styles.css has no content.ComSpec in the environment block, but as Page Template:Mono/styles.css has no content.COMSPEC inside the DOS emulator NTVDM.

When not present in the environment block, the command processor Page Template:Mono/styles.css has no content.CMD.EXE of Windows NT sets Page Template:Mono/styles.css has no content.COMSPEC to its own full path; it evaluates Page Template:Mono/styles.css has no content.COMSPEC, for example, to execute builtin commands in pipelines and to execute command lines with its builtin Page Template:Mono/styles.css has no content.FOR command.[2]

The variable's contents can be displayed by typing SET COMSPEC or ECHO %COMSPEC% at the command prompt.

The environment variable by default points to the full path of the command-line interpreter. It can also be made by a different company or be a different version.

Another use of this environment variable is on a computer with no hard disk, which needs to boot from a floppy disk, is to configure a RAM disk. The Page Template:Mono/styles.css has no content.COMMAND.COM file is copied to the RAM disk during boot, and the Page Template:Mono/styles.css has no content.COMSPEC environment variable is set to the new location on the RAM disk. This way the boot disk can be removed without the need to reinsert it after a big application has been stopped. The command-line interpreter will be reloaded from the RAM disk instead of the boot disk.

References

Page Template:Reflist/styles.css has no content.

Template:Disk operating systems

Template:Asbox