I'm having trouble with child processes not inheriting their parent's
'current' directory. This is
seen from the command line, as well as when I use scripts to execute
I can reproduce this in a command window as follows:
(Start a command window)
C:\Documents and Settings\hartbr>cd \
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\hartbr>
It should have started the new cmd.exe process in C:\. I've checked
this on several other computers and mine is the only one with this
Does anyone know what might cause this? I've been searching all day
with no luck.
Brian Hartin <firstname.lastname@example.org> wrote in news:e52e3e42-faa3-49e3-
> Does anyone know what might cause this? I've been searching all day
> with no luck.
I don't think there's even a way to cause it deliberately, so I guess
something must have got broken...
As the environment is transferred to the child process in memory, I would
run a memory tester like Memtest86+ http://www.memtest.org/
If the memory is ok, I would check the disk -- and especially cmd.exe
And in the case something has gone wrong during the past few days, I would
try to restore the system to some old restoring point
> And in the case something has gone wrong during the past few days, I would
> try to restore the system to some old restoring point
It was a registry value: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command
Processor. It had something like 'cmd.exe /c CD C:\Documents and
Settings\Hartbr'. That caused every new instance of cmd.exe to start
in that directory. Not sure how that setting got there.