PC Review


Reply
Thread Tools Rate Thread

Cmd.exe won't inherit directory

 
 
Brian Hartin
Guest
Posts: n/a
 
      27th May 2010
Hi there,

On my PC, cmd.exe will not inherit the current directory. This is
seen from the command line, as well as when processes are launched
from scripts, etc.

I can reproduce this in a command window as follows:

(Start a command window)

C:\Documents and Settings\hartbr>cd \

C:\>c:\windows\system32\cmd.exe
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
problem.

Does anyone know what might cause this? I've been searching all day
with no luck.

Thanks!

Brian
 
Reply With Quote
 
 
 
 
John John - MVP
Guest
Posts: n/a
 
      28th May 2010
Brian Hartin wrote:
> Hi there,
>
> On my PC, cmd.exe will not inherit the current directory. This is
> seen from the command line, as well as when processes are launched
> from scripts, etc.
>
> I can reproduce this in a command window as follows:
>
> (Start a command window)
>
> C:\Documents and Settings\hartbr>cd \
>
> C:\>c:\windows\system32\cmd.exe
> 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
> problem.
>
> Does anyone know what might cause this? I've been searching all day
> with no luck.


Maybe take a look at the AutoRun value at
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor

The above is system wide, the same setting can also be per user, take a
look at the same key in the HKCU subtree.

John
 
Reply With Quote
 
Brian Hartin
Guest
Posts: n/a
 
      28th May 2010
> Maybe take a look at the AutoRun value at
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor


John,

That was it! Thank you so much. Do you know how this value typically
gets set?

Thanks again,

Brian
 
Reply With Quote
 
John John - MVP
Guest
Posts: n/a
 
      28th May 2010
Brian Hartin wrote:
>> Maybe take a look at the AutoRun value at
>> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor

>
> John,
>
> That was it! Thank you so much.


You're welcome.


> Do you know how this value typically
> gets set?


Typically by a user or administrator. By default the this (AutoRun)
value is not present in the HKCU branch and is blank in the HKLM branch
and the command prompt always starts in the %userprofile% directory.
Installing certain utilities might have changed or added the value.

John
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inherit shapper Microsoft C# .NET 0 1st Sep 2009 02:56 PM
Inherit app DaveP Microsoft C# .NET 1 9th Feb 2007 05:35 AM
Inherit DAVE P Microsoft C# .NET 5 26th Jan 2007 09:06 PM
Inherit Rodrigo Ferreira Microsoft C# .NET 4 27th Jun 2005 12:34 PM
inherit Frank Microsoft VB .NET 11 6th Jul 2004 03:27 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:45 PM.