the cmd.exe command

C

Charlie Bress

When I run cmd.exe the DOS prompt that shows up is in the form c:\documents
and settings\charlie.

The sort of things that I want to run such as ipconfig, ping, etc. are in
c:\windows\system32.

How can I make cmd give me aDOS prompt that defaults to
c:\windows\system32?

Charlie
 
C

Claymore

When I run cmd.exe the DOS prompt that shows up is in the form c:\documents
and settings\charlie.

The sort of things that I want to run such as ipconfig, ping, etc. are in
c:\windows\system32.

How can I make cmd give me aDOS prompt that defaults to
c:\windows\system32?

Charlie

Hi Charlie,

You should be able to run ping and ipconfig directly from the default
path shown.
 
P

Patrick Keenan

Charlie Bress said:
When I run cmd.exe the DOS prompt that shows up is in the form
c:\documents and settings\charlie.

Technically, it's a command prompt, not a DOS prompt. It isn't DOS in the
sense of MS-DOS. It's fully Windows XP without the pictures.
The sort of things that I want to run such as ipconfig, ping, etc. are in
c:\windows\system32.

Yes, that's where they live.
How can I make cmd give me aDOS prompt that defaults to
c:\windows\system32?

Well, you don't need to, but to do that, you'd need to make a shortcut that
specifies that it starts in that folder.

And you don't need to do this because of the PATH environment variable,
which puts the system32 folder in the path, and makes all those tools
available.

If you are asking this because you are finding that the tools don't run,
getting a message that they can't be found, that's actually a problem with
the PATH environment variable.

To fix it, right-click on My Computer, then properties, Advanced, and
Envirionment Variables. In the lower section, click on Path (you may need
to scroll to find it) then on Edit. Add this to the variable value,
preferably near the start:

%SystemRoot%\system32;

Don't miss the semicolon that separates values.

Click OK back to the desktop, and those tools should be available to you.

HTH
-pk
 
B

bud

Charlie Bress said:
When I run cmd.exe the DOS prompt that shows up is in the form
c:\documents and settings\charlie.

The sort of things that I want to run such as ipconfig, ping, etc. are in
c:\windows\system32.

How can I make cmd give me aDOS prompt that defaults to
c:\windows\system32?

Charlie

Just use the CD command. Type in,
CD c:\windows\system32
press enter.
 
R

Ramesh, MS-MVP

Charlie,

You should be able to run IPCONFIG, PING etc from any path in the Command Prompt, provided that the Windows\System32 folder is present in the PATH variable. To verify that, type "PATH" and press ENTER. By default, the following folders would be present in PATH

C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows Shell/User]
Windows® Troubleshooting http://www.winhelponline.com


When I run cmd.exe the DOS prompt that shows up is in the form c:\documents
and settings\charlie.

The sort of things that I want to run such as ipconfig, ping, etc. are in
c:\windows\system32.

How can I make cmd give me aDOS prompt that defaults to
c:\windows\system32?

Charlie
 
J

John John

The Path variable has to include these 2 variables:
%SystemRoot%\system32;%SystemRoot%

If the path includes those yet your commands don't run check the "path"
value at tht following registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session
Manager\Environment

Make sure that the value type is REG_EXPAND_SZ. If it isn't
REG_EXPAND_SZ rename the current Path value to PathOld then create a new
Path REG_EXPAND_SZ value and copy the path from the PathOld to the new
value. You have to reboot the computer to apply the changes.

John
 
G

Guest

Hi Charlie,

A simple solution would be to create a batch file in your Windows directory
named mycmd.bat with the single line:

@cmd /K cd /D %windir%\system32

Instead of typing "cmd" in the run dialog type "mycmd" and it will always
put you in the C:\Windows\system32 directory.
 

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

Similar Threads


Top