command prompt to default to open directory?

M

Matthias Tacke

Gary said:
Matthias Tacke said:
At the cost of an additonal dependency I changed my already posted
commandline to make the folder of the mru explorer window the current.
Create/change shortcuts for cmd.exe with this line:
CMD.EXE /K for /F "tokens=8,*" %A in ('cmdow /T /F^|findstr "explorer [A-Z]:"^|linex -h 1') do @pushd %B

What happens if more than one explorer windows is open?
cmdow takes the top most window first, that should be the most recently
used. My other posting takes all windows, but with a single line it's
not possible to revert the order, so you may tkae the batch with menu if
it's not the mru explorer window you are after.

HTH
 
N

Nick

I now found another computer, this one running Windows XP that is
doing the same thing. Any ideas what I could check for?
 
G

Gary Smith

Nick said:
I now found another computer, this one running Windows XP that is
doing the same thing. Any ideas what I could check for?

The same thing as what? This thread has become too broad to be able to
understand a question with no obvious referents.

So far as I can tell, the command prompt window by default opens to
%homepath%%homedrive%. Precsidely how those two variables are set seems
to depend on several factors, including which updates are installed. If
you want to force a specific behavior, there are several ways to do that.
I think they've already been covered.
 
N

Nick

Going back, I have two computers, one with Windows 2000 and one with
Windows XP as well as other computers with the same operating systems,
all with the latest patches from Microsoft. ONLY the two machines in
question somehow are setup to default the command prompt to whatever
folder is open in My Computer. So, for example, if I open My Computer
and open the C:\temp folder and then go to Start->Run and type in
either "command" or "cmd" and click OK, the DOS prompt will appear and
the current directory will be c:\temp>. Likewise if I have
c:\Documents and Settings\username\temp opened in My computer then run
"command" or "cmd", then the DOS prompt will appear and the current
directory will be C:\documents and Settings\username\temp. After
opening the DOS prompt, I'm running "SET" to see what the homepath and
homedrive is, and it never changes, so somehow it is using something
else. I tried to check all supplied suggestions, to no avail. Both
computers have AutoRun in HKLM, which are empty and no AutoRun in
HKCU. I'm not typing in any other code, just "command" or "cmd". One
person supplied a method to reproduce part of the behavior (to default
to the open folder), but it is not the same as you don't just type in
"command" or "cmd" from my understanding.

Does anyone have any ideas what else I could check to see how this
might be happening?
 
M

Matthias Tacke

Nick said:
Does anyone have any ideas what else I could check to see how this
might be happening?

Since this behaviour change is reported here several times after the
installation of hotfixes/service packs, I doubt, if it is tracked down
to a special one, there is the option to remove that one without
sacrifying system health/security.
 
G

Gary Smith

Nick said:
Going back, I have two computers, one with Windows 2000 and one with
Windows XP as well as other computers with the same operating systems,
all with the latest patches from Microsoft. ONLY the two machines in
question somehow are setup to default the command prompt to whatever
folder is open in My Computer. So, for example, if I open My Computer
and open the C:\temp folder and then go to Start->Run and type in
either "command" or "cmd" and click OK, the DOS prompt will appear and
the current directory will be c:\temp>.

Something very unusual is happening on these machines. So far as I know,
there is no Windows setting that can make this happen. There must be some
program running on these machines which makes this happen.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top