Execute a particular program with all command consoles

In some cases you might want to have Windows 2000 automatically execute a particular application for each command console you open. For example, you might need to load a special-purpose driver for your consoles. Or perhaps you want to automatically issue a command that changes directories, echoes a message to the screen, writes a string to a log file, etc. You can use a setting in the registry to specify a program or command that Windows 2000 automatically executes for all command consoles.

Configure the console AutoRun setting

The registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor contains a handful of commands that globally affect command consoles. You can use the AutoRun setting to specify an internal command or path to an external command that Windows 2000 automatically executes when each console starts.

  1. Click Start Run, and enter regedit in the Run dialog box.

  2. In the Registry Editor open the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor key.

  3. Double-click the AutoRun value and set its value to the internal command or path to the executable file you want to execute. Include any required command parameters or switches.

Get Windows 2000 Quick Fixes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.