Run commands automatically at command prompt start
28 February 2003 by Snakefoot | Comment » | Trackback OffWhen opening a command prompt (cmd.exe) console, then it checks the following STRING values in the registry to see if any commands should be executed:
Note to specify several commands separate them with &&, or use a batch file like a Autoexec.bat.
Note the cmd has a switch to disable the execution of the Autorun:
Note the commands above will change the command prompt and color and change the default path/directory when opening the command prompt to the root of the C-drive.[HKEY_CURRENT_USER \SOFTWARE \Microsoft \Command Processor]
[HKEY_LOCAL_MACHINE \SOFTWARE \Microsoft \Command Processor]
Autorun = "prompt [%computername%]$S$P$G && COLOR 0A && CD C:\"
Note to specify several commands separate them with &&, or use a batch file like a Autoexec.bat.
Note the cmd has a switch to disable the execution of the Autorun:
Credits jsifaq.comcmd /d
Tags:
Category:
Updated: 23 September 2007