Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

start directory for run->cmd

Status
Not open for further replies.

anorakgirl

Programmer
Jun 5, 2001
103
GB
Hi,
when I go to the start menu and click run, then type cmd, the cmd window opens with the prompt:

c:/Documents and Settings/myusername>

But I keep all the files I want to work on somewhere else, so would like it to start there, to save me having to always go cd ../../blah/blah etc

I'm guessing I could set an environment variable for a home directory or something, as it is clearly going to what it thinks is my home directory now, but I don't know what to set. Any clues?

Thanks!

~ ~
 
Hello anorakgirl,

You can do it like the .reg file suggested, on per user basis. (On system-wide, use HKLM instead.)
Code:
REGEDIT4

[HKEY CURRENT USER\Software\Microsoft\Command Processor]
"AutoRun"="cd /d c:\\blah\\blah\\blah"
(or without /d option, as you like it.)

regards - tsuji
 
Correction:

I know you've understood, but just fear to mislead others, the root should be read:
HKEY[red]_[/red]CURRENT[RED]_[/RED]USER

- tsuji
 
There is also the Open Command Window Here powertoy avalible from Microsoft that will allow you to open a command prompt from a specifc folder in Explorer by right-clicking it and selecting Open Command Window Here.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top