Default cmd prompt

G

Guest

I recently installed a resource kit for XP and it changed my default command
prompt directory. Rather than copying ping.exe or ipconfig.ext etc. to the
new default home drive I want my command prompt start on my C drive like
before. Now when I need to ping something or run other commands I keep
having to C: and then CD c:\winnt\system32. Can anyone let me know where to
go to correct this? I'm not having much luck searching this topic so
hopefully there's a quick fix. Thanks,
Shawn
 
W

Wesley Vogel

Try this...

Right click the Desktop | New | Shortcut |
Paste this in the location box:

%SystemRoot%\system32\cmd.exe

Click Next | Click Finish |

Right click the new cmd.exe shortcut | Properties |
In the Start in box replace %windir% with C:\ |
Apply | OK

Double click the new shortcut and you should see.............

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\>

You can also change the Start in for the cmd shortcut located under
Accessories on the Start Menu.

HOW TO: Set the Command Processor Appearance in Windows XP
http://support.microsoft.com/default.aspx?scid=kb;en-us;309019

Set the Command prompt default path to a certain directory
http://windowsxp.mvps.org/autoruncmd.htm

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
M

Matej Barac

Shawn said:
I recently installed a resource kit for XP and it changed my default
command prompt directory. Rather than copying ping.exe or
ipconfig.ext etc. to the new default home drive I want my command
prompt start on my C drive like before. Now when I need to ping
something or run other commands I keep having to C: and then CD
c:\winnt\system32. Can anyone let me know where to go to correct
this? I'm not having much luck searching this topic so hopefully
there's a quick fix. Thanks, Shawn
ping.exe and other programs in /system32 can be run from any folder. For
example, if you are currently inside 'C:\My Folder' and type program.exe
(or just 'program') Windows will first search C:\My Folder for that
application, if it's not there it will search inside \system32 and try
to execute it.
 
G

george

Shawn McGowen said:
I recently installed a resource kit for XP and it changed my default
command
prompt directory. Rather than copying ping.exe or ipconfig.ext etc. to
the
new default home drive I want my command prompt start on my C drive like
before. Now when I need to ping something or run other commands I keep
having to C: and then CD c:\winnt\system32. Can anyone let me know where
to
go to correct this? I'm not having much luck searching this topic so
hopefully there's a quick fix. Thanks,
Shawn

Shawn,

Many of the 'system' commands can be run no matter what your 'current
directory' assignment is.

For the ones that need to be run from a specific directory there are is a
nice method that involves setting some stuff in the registry.
It's called 'Command here' or 'Command prompt here' (or something to that
effect.
Once set, it gives you the option to right-click on any folder in Explorer
and choose Command here.
It will then open up the command prompt with that particular directory as
the current one.

Copy the below stuff into a file and name it cmdhere.inf.
right-click the file and choose 'install'.
Right-click a folder to see the result.
hth
george

; ----------------------------------
; "CMD Prompt Here" PowerToy
;
; Copyright 1996 Microsoft Corporation
;
[version]
signature="$CHICAGO$"

[CmdHereInstall]
CopyFiles = CmdHere.Files.Inf
AddReg = CmdHere.Reg

[DefaultInstall]
CopyFiles = CmdHere.Files.Inf
AddReg = CmdHere.Reg

[DefaultUnInstall]
DelFiles = CmdHere.Files.Inf
DelReg = CmdHere.Reg

[SourceDisksNames]
55="CMD Prompt Here","",1

[SourceDisksFiles]
CmdHere.INF=55

[DestinationDirs]
CmdHere.Files.Inf = 17

[CmdHere.Files.Inf]
CmdHere.INF

[CmdHere.Reg]
HKLM,%UDHERE%,DisplayName,,"%CmdHereName%"
HKLM,%UDHERE%,UninstallString,,"rundll32.exe
syssetup.dll,SetupInfObjectInstallAction DefaultUninstall 132
%17%\CmdHere.inf"
HKCR,Directory\Shell\CmdHere,,,"%CmdHereAccel%"
HKCR,Directory\Shell\CmdHere\command,,,"%11%\cmd.exe /k cd ""%1"""
HKCR,Drive\Shell\CmdHere,,,"%CmdHereAccel%"
HKCR,Drive\Shell\CmdHere\command,,,"%11%\cmd.exe /k cd ""%1"""

[Strings]
CmdHereName="CMD Prompt Here"
CmdHereAccel="CMD &Prompt Here"
UDHERE="Software\Microsoft\Windows\CurrentVersion\Uninstall\CmdHere"
;-------------------------------------
 

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