path for command prompt Thread last updated on 2003-08-02 03:29:27

Posted by member 35694 on 2003-07-31 00:29:47

When I open a command prompt, the path that is defaulted to seems always to be the config directory for whatever theme I'm running at the time (in this case: c:\LiteStep\themes\Retro\config ). I'd like to have it default somewhere useful, like my desktop, or the system root, but can't find where this is configured.

TIA,

patrick

Posted by member 37809 on 2003-07-31 01:02:36 link

That would be the working path. What it is depends on from where (which process) you call the prompt, I think?

You could make a(n explorer) shortcut to the command prompt, so that you can specify the working path, and call this instead of your command prompt as 'cmd'/'cmd.exe' or 'command'/'command.com', or try just calling $ComSpec$ (or %ComSpec% depending on your ls build).

One of these is bound to work ;0

Posted by member 35694 on 2003-07-31 01:22:19 link

I'm calling the command prompt via !Run and then cmd (so, ctrl-alt-u, then cmd).

The way I figure it, the starting dir has to be specified somewhere, likely with some kind of argument specifying that path, but I dunno where that is.

Posted by member 35694 on 2003-07-31 01:23:49 link

Oh, and how do I call $ComSpec$ in a useful way?

Posted by member 35694 on 2003-08-01 11:53:37 link

Anyone?

Posted by member 36955 on 2003-08-01 12:49:34 link

well, that depends on how you want to use it

Posted by member 35694 on 2003-08-01 13:05:06 link

doy: can you clue me in on one of the (obviously) many uses? I dont' know squat about how to use many of the LS things...I haven't dug deep enough for long enough.

Posted by member 182 on 2003-08-01 13:45:09 link

simple.

1. rename cmd.exe (in your windows\system32.exe dir, and in the dllcache subdir) to _cmd.exe
2. create a shortcut to this exe in your system32 dir, named cmd
3. edit the shortcut, and set the working dir to whatever you want

now whenever you run cmd, your shortcut will actually be run, and you should always start in the dir you chose :)

Posted by member 37809 on 2003-08-01 14:01:01 link

psynapse: that's sort of drastic; does it work (do batch files still work, safe mode, etc.)? :D

kramp: the end method of running the thing you mean?

I favor just calling it through a hotkey, since you do use a keyboard to work the command prompt.

Assuming you use an OTS setup, in $PersonalDir$evars.rc, you could redefine CmdPrompt to "$ComSpec$" and in $PersonalDir$hotkey.rc have something like
*Hotkey Win C "$CmdPrompt$"


Or if you're lazy, just have in a good place
*Hotkey Win C $ComSpec$


Check the Links section of this site for the Docs and more.

Posted by member 182 on 2003-08-01 14:22:40 link

absolutely tnl, i've always done it this way :)

Posted by member 99 on 2003-08-02 03:29:27 link

Don't rename cmd.exe, change %comspec%. Look for "environment" in the system control panel applet under the Advanced tab. or...

If you want to start cmd in a specific dir from litestep, use '"$ComSpec$" /K cd wherever' (should also work for command.com)

When cmd.exe is started without the /D switch it will execute stuff stored in a specific place in the registry. (under HKLM and HKCU) Run cmd /? from a cmd window for the exact place.