Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Odd Behavior: CMD.EXE / Command Prompt default folder changing ?

1 view
Skip to first unread message

Jaruzel

unread,
Apr 2, 2009, 4:46:05 AM4/2/09
to
Hi all,

I've stumbled over a peculiarity in my Windows SP3 Pro (+ all
hotfixes) build (it's for mass deployment, but this isn't a deployment
issue per se).

Basically the CMD.EXE default folder is following the current explorer
window folder.

For example, if I have explorer open at C:\Drivers\Intel and then
click on Start Menu, then RUN, and type ONLY 'cmd' and click OK,
instead of cmd.exe launching with my profile folder as the default
folder, it opens with the current explorer path as the default folder,
ie. C:\Drivers\Intel. It doesn't matter where on the disk explorer is
pointing to, cmd.exe will mirror it.

Whereas this behavior is nice, I am concerned that I don't know what
changed it, or why. My primary issue is that this may affect any batch
files or scripts that launch in the user context.

I HAVE checked the Command Processor\AutoRun keys in the registry and
they are blank or non-existent, so it isn't that.

Any ideas, anyone, as to what caused this change in behavior ?

Thanks,

Matt Owen
http:/www.mattowen.com

Kelly

unread,
Apr 3, 2009, 7:16:51 PM4/3/09
to
This happens when you have added CMD to the right click.

--

All the Best,
Kelly (MS-MVP/DTS&XP)

Taskbar Repair Tool Plus!
http://www.kellys-korner-xp.com/taskbarplus!.htm


"Jaruzel" <jar...@gmail.com> wrote in message
news:7a367808-014a-4888...@w9g2000yqa.googlegroups.com...

Tim Meddick

unread,
Apr 3, 2009, 7:39:12 PM4/3/09
to
Hi Jaruzel,
to change the default folder back to your user profile
folder add this line to the file Autoexec.nt in the system32 folder:

if %1]==] cd %USERPROFILE%

Adding this will NOT affect the right-click "Command Prompt from Here" shell
extension, will work as normal. Or you could change %USERPROFILE% for any
folder you want to be the default folder for Command Prompts.
--

Cheers, Tim Meddick, Peckham, London.


"Kelly" <ke...@mvps.org> wrote in message
news:BFDF0311-F5B8-4F79...@microsoft.com...

0 new messages