CMD window from run menu

G

Gil

When I go to Start/Run and enter cmd it opens a command window with the
prompt "C:\Documents and Settings\Gil>", and if I then type "ipconfig"
it says "'ipconfig' is not recognized as an internal or external
command, operable program or batch file.".
If I "CD \windows\system32" ipconfig will now run. Other programs like
Regedit [Which is in C:\windows\]run just fine.
If I type "Path" I get:
"PATH=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program
Files\Common Files\Roxio shared\DLLShared\;"

How can I set this up so that it starts in C:\windows, or system32 and
will find everything on the path?
 
R

Ramesh, MS-MVP

Click Start, Run and type:

cmd /k reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v Path

(It's a single line command).

Copy the output and include it in your reply.

--
Regards,

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


When I go to Start/Run and enter cmd it opens a command window with the
prompt "C:\Documents and Settings\Gil>", and if I then type "ipconfig"
it says "'ipconfig' is not recognized as an internal or external
command, operable program or batch file.".
If I "CD \windows\system32" ipconfig will now run. Other programs like
Regedit [Which is in C:\windows\]run just fine.
If I type "Path" I get:
"PATH=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program
Files\Common Files\Roxio shared\DLLShared\;"

How can I set this up so that it starts in C:\windows, or system32 and
will find everything on the path?
 
G

Gil

Ramesh said:
Click Start, Run and type:

cmd /k reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v Path

(It's a single line command).

Copy the output and include it in your reply.


! REG.EXE VERSION 3.0

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session
Manager\Environment
Path REG_EXPAND_SZ
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\
System32\Wbem;C:\Program Files\Common Files\Roxio
Shared\DLLShared\;;C:\Program
Files\VDMSound;C:\Program Files\QuickTime\QTSystem\


C:\Documents and Settings\Gil>
 
R

Ramesh, MS-MVP

The value type is correctly set. Run this command also, and post the results:

cmd /k reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment"

--
Regards,

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


Gil said:
Click Start, Run and type:

cmd /k reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v Path

(It's a single line command).

Copy the output and include it in your reply.


! REG.EXE VERSION 3.0

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session
Manager\Environment
Path REG_EXPAND_SZ
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\
System32\Wbem;C:\Program Files\Common Files\Roxio
Shared\DLLShared\;;C:\Program
Files\VDMSound;C:\Program Files\QuickTime\QTSystem\


C:\Documents and Settings\Gil>
 
G

Gil

Ramesh said:
The value type is correctly set. Run this command also, and post the results:

cmd /k reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
Thank you for your time and expertise!

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

C:\Documents and Settings\Gil>cmd /k reg query
"HKLM\SYSTEM\CurrentControlSet\Co
ntrol\Session Manager\Environment"

! REG.EXE VERSION 3.0

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session
Manager\Environment
ComSpec REG_EXPAND_SZ %SystemRoot%\system32\cmd.exe
Path REG_EXPAND_SZ
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\
System32\Wbem;C:\Program Files\Common Files\Roxio
Shared\DLLShared\;;C:\Program
Files\VDMSound;C:\Program Files\QuickTime\QTSystem\;C:\Program
Files\Panda Softw
are\Panda Antivirus + Firewall 2007\
windir REG_EXPAND_SZ %SystemRoot%
FP_NO_HOST_CHECK REG_SZ NO
OS REG_SZ Windows_NT
PROCESSOR_ARCHITECTURE REG_SZ x86
PROCESSOR_LEVEL REG_SZ 15
PROCESSOR_IDENTIFIER REG_SZ x86 Family 15 Model 43 Stepping
1, Authe
nticAMD
PROCESSOR_REVISION REG_SZ 2b01
NUMBER_OF_PROCESSORS REG_SZ 2
PATHEXT REG_SZ .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
TEMP REG_EXPAND_SZ %SystemRoot%\TEMP
TMP REG_EXPAND_SZ %SystemRoot%\TEMP
RoxioCentral REG_SZ C:\Program Files\Common Files\Roxio
Shared\Roxio
Central\
VDMSPath REG_EXPAND_SZ C:\Program Files\VDMSound
CLASSPATH REG_SZ .;C:\Program Files\QuickTime\QTSystem\QTJava.zip
QTJAVA REG_SZ C:\Program Files\QuickTime\QTSystem\QTJava.zip

C:\Documents and Settings\Gil>
 
R

Ramesh, MS-MVP

Hi Gil,

Don't know why the %systemroot% variable doesn't resolve correctly, even though the value/value type is correctly set. Use this workaround:

1. Login as administrator or equivalent.
2. Right-click My Computer, and then click Properties
3. Click the Advanced tab. Click Environment variables
4. Under System variables, double-click windir
5. Type C:\Windows as the value
6. Click OK, OK to close the dialog.

Note: The above assumes that Windows is installed in C:\Windows directory. If Windows is installed to a different drive/directory, you will need to adjust the above path accordingly.

--
Regards,

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


Gil said:
The value type is correctly set. Run this command also, and post the results:

cmd /k reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
Thank you for your time and expertise!

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

C:\Documents and Settings\Gil>cmd /k reg query
"HKLM\SYSTEM\CurrentControlSet\Co
ntrol\Session Manager\Environment"

! REG.EXE VERSION 3.0

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session
Manager\Environment
ComSpec REG_EXPAND_SZ %SystemRoot%\system32\cmd.exe
Path REG_EXPAND_SZ
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\
System32\Wbem;C:\Program Files\Common Files\Roxio
Shared\DLLShared\;;C:\Program
Files\VDMSound;C:\Program Files\QuickTime\QTSystem\;C:\Program
Files\Panda Softw
are\Panda Antivirus + Firewall 2007\
windir REG_EXPAND_SZ %SystemRoot%
FP_NO_HOST_CHECK REG_SZ NO
OS REG_SZ Windows_NT
PROCESSOR_ARCHITECTURE REG_SZ x86
PROCESSOR_LEVEL REG_SZ 15
PROCESSOR_IDENTIFIER REG_SZ x86 Family 15 Model 43 Stepping
1, Authe
nticAMD
PROCESSOR_REVISION REG_SZ 2b01
NUMBER_OF_PROCESSORS REG_SZ 2
PATHEXT REG_SZ ..COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
TEMP REG_EXPAND_SZ %SystemRoot%\TEMP
TMP REG_EXPAND_SZ %SystemRoot%\TEMP
RoxioCentral REG_SZ C:\Program Files\Common Files\Roxio
Shared\Roxio
Central\
VDMSPath REG_EXPAND_SZ C:\Program Files\VDMSound
CLASSPATH REG_SZ .;C:\Program Files\QuickTime\QTSystem\QTJava.zip
QTJAVA REG_SZ C:\Program Files\QuickTime\QTSystem\QTJava.zip

C:\Documents and Settings\Gil>
 
G

Gil

Ramesh said:
Hi Gil,

Don't know why the %systemroot% variable doesn't resolve correctly, even though the value/value type is correctly set. Use this workaround:

1. Login as administrator or equivalent.
2. Right-click My Computer, and then click Properties
3. Click the Advanced tab. Click Environment variables
4. Under System variables, double-click windir
5. Type C:\Windows as the value
6. Click OK, OK to close the dialog.

Note: The above assumes that Windows is installed in C:\Windows directory. If Windows is installed to a different drive/directory, you will need to adjust the above path accordingly.
The Environment variable windir is,and was, set to C:\Windows.
This turns out to be a lot of work to save me a few keystrokes, but I
really don't like unsolved problems.
Thanks
 
R

Ramesh, MS-MVP

Gil,

One sure way to fix the problem is to replace every instance of the string %SystemRoot% with "C:\Windows".

1. Login as administrator or equivalent.
2. Right-click My Computer, and then click Properties
3. Click the Advanced tab. Click Environment variables
4. Under System variables, double-click Path
5. Type the following:

C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Common Files\Roxio shared\DLLShared;

6. Click OK, OK to close the dialog.

The reason why %systemroot% does not resolve correctly, is still a mystery and I'll have to investigate it.

--
Regards,

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


Gil said:
Hi Gil,

Don't know why the %systemroot% variable doesn't resolve correctly, even though the value/value type is correctly set. Use this workaround:

1. Login as administrator or equivalent.
2. Right-click My Computer, and then click Properties
3. Click the Advanced tab. Click Environment variables
4. Under System variables, double-click windir
5. Type C:\Windows as the value
6. Click OK, OK to close the dialog.

Note: The above assumes that Windows is installed in C:\Windows directory. If Windows is installed to a different drive/directory, you will need to adjust the above path accordingly.
The Environment variable windir is,and was, set to C:\Windows.
This turns out to be a lot of work to save me a few keystrokes, but I
really don't like unsolved problems.
Thanks
 
G

Gil

Ok, now ipconfig will open from the command window. The command window
still has the path "C:\Documents and Settings\Gil>", but everything
seems to work.
Thanks again.
 
R

Ramesh, MS-MVP

Thanks for the feedback!

--
Regards,

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


Ok, now ipconfig will open from the command window. The command window
still has the path "C:\Documents and Settings\Gil>", but everything
seems to work.
Thanks again.
 

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