You still use the command prompt for some tasks. It would be practical if you could automatically switch to a particular directory when you call up the prompt.
You still use the command prompt for some tasks. It would be practical if you could automatically switch to a particular directory when you call up the prompt.
With a registry entry, you can define commands for the command line, which the system executes when starting a command prompt window. This can be compared to running the 'autoexec.bat' file when starting old DOS and Windows systems. For this, open the 'Run' command in the start menu, enter 'regedit' and click 'OK'.
In the registry editor, navigate your way to the 'HKEY_CURRENT_ USER\Software\M icrosoft\Com mand Processor' key. Go to 'Edit I New I Expandable string value', enter 'Autorun' and press enter. The new value type must now be 'REG_EXPAND_SZ'. To edit the new entry, double-click 'Autorun'. In the value field, enter the command that should be automatically executed when the command prompt starts.
For example:
cd c:\Windows
The above value takes you directly to the 'Windows' directory on starting the command prompt. Similarly, you can start up the command prompt at any other directory of your choice.
Last edited by Javaughn Denness; 07-14-2009 at 05:35 AM.
Bookmarks