Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IP Config not found 4

Status
Not open for further replies.

JPJeffery

Technical User
May 26, 2006
600
GB
Check out this output from a command prompt on one of our domain controllers (edited for secure anonymity!):
Code:
Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.

C:\Documents and Settings\Administrator.domain>cd\

C:\>ipconfig /all
'ipconfig' is not recognized as an internal or external command,
operable program or batch file.

C:\>dir ipconfig*.*/s
 Volume in drive C has no label.
 Volume Serial Number is BCB1-2EF9

 Directory of C:\WINDOWS\$NtServicePackUninstall$

20/09/2004  19:05            61,440 ipconfig.exe
               1 File(s)         61,440 bytes

 Directory of C:\WINDOWS\ServicePackFiles\i386

17/02/2007  03:20            63,488 ipconfig.exe
               1 File(s)         63,488 bytes

 Directory of C:\WINDOWS\system32

17/02/2007  03:20            63,488 ipconfig.exe
               1 File(s)         63,488 bytes

     Total Files Listed:
               3 File(s)        188,416 bytes
               0 Dir(s)  73,420,489,728 bytes free

C:\>path
PATH=C:\Program Files\Support Tools\;%SystemRoot%\system32;%SystemRoot%;%SystemR
oot%\System32\Wbem;C:\Program Files\Symantec\pcAnywhere\;C:\Program Files\Common
 Files\WatchGuard\lib;

C:\>set systemr
SystemRoot=C:\WINDOWS

C:\>cd C:\WINDOWS\system32

C:\WINDOWS\system32>ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : DC01
   Primary Dns Suffix  . . . . . . . : domain.com
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : domain.com

Ethernet adapter Local Area Connection:

   Connection-specific DNS Suffix  . : domain.com
   Description . . . . . . . . . . . : Broadcom NetXtreme Gigabit Ethernet
   Physical Address. . . . . . . . . : 00-0F-20-D0-1A-44
   DHCP Enabled. . . . . . . . . . . : No
   IP Address. . . . . . . . . . . . : xxx.xxx.xxx.xxx
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : xxx.xxx.xxx.xxx
   DNS Servers . . . . . . . . . . . : xxx.xxx.xxx.xxx
                                       xxx.xxx.xxx.xxx
   Primary WINS Server . . . . . . . : xxx.xxx.xxx.xxx
   Secondary WINS Server . . . . . . : xxx.xxx.xxx.xxx

C:\WINDOWS\system32>

And similar with PING:

Code:
C:\>ping -n 1 [URL unfurl="true"]www.google.com[/URL]
'ping' is not recognized as an internal or external command,
operable program or batch file.

C:\>cd C:\WINDOWS\system32

C:\WINDOWS\system32>ping -n 1 [URL unfurl="true"]www.google.com[/URL]

Pinging [URL unfurl="true"]www.l.google.com[/URL] [72.14.204.103] with 32 bytes of data:

Request timed out.

Ping statistics for 72.14.204.103:
    Packets: Sent = 1, Received = 0, Lost = 1 (100% loss),

Is crazy! Not the end of the world, but still, curious...

JJ
[small][purple]Variables won't. Constants aren't[/purple]
There is no apostrophe in the plural of PC (or PST, or CPU, or HDD, or FDD, or photo, or breakfast...and so on)[/small]
 
;%SystemRoot%;

etc.

Path needs the expanded version of these environment variables.
 
Will they work if you leave them in the default path (instead of changing to the root of c:)?
 
strongm
Not absolutely sure what you mean. To clarify, I understand that the variables need to hold a valid value but I've demonstrated that they do in the text above.

e.g.
Code:
C:\>set systemr
SystemRoot=C:\WINDOWS

Obviously that only shows one, so here's the expansion of all the system variables in the PATH statement:
Code:
C:\>set sys
SystemDrive=C:
SystemRoot=C:\WINDOWS

tlcscousin
Yes, again as demonstrated above, if I change the current directory to c:\windows\system32 the commands work - but of course I should have to because that folder is in the path statement.

JJ
[small][purple]Variables won't. Constants aren't[/purple]
There is no apostrophe in the plural of PC (or PST, or CPU, or HDD, or FDD, or photo, or breakfast...and so on)[/small]
 
what strongm neans,
when you type path=>enter in cmd, the variables should be resolved to the values, i.e

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
should show as

c:\windows\system32;c:\windows;c:\windows\System32\Wbem


M. Knorr

MCSE, MCTS, MCSA, CCNA
 
>so here's the expansion

The point is that they are NOT expanded in the PATH statement; doesn't matter that they are expanded anywhere else.

One possible technical reason for this is that the Path value in the Registry has been incorrectly set as REG_SZ instead of REG_EXPAND_SZ (the first is a normal string, the second is a string that, when read from the registry, needs to be expanded) - and the fact that your PATH statement shows the environment variables in their unexpanded state is clear evidence that this is happening. There are a few tools and application installations which have been known to erroneously change the type of the Path value (e.g. doPDF's installer did this for a while until the bug was fixed).

If you have a look at the following key in the registry

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

and look for Path you will almost cetrainly see that it is of type REG_SZ

Sadly there is no easy way of converting the type of the value. You have to:

1. Copy Path value content
2. Delete the Path value
3. Create a new value named "Path" of type REG_EXPAND_SZ
4. Paste in the value you copied in step 1
5. Restart machine
 
Ah, I see. Thank you, Gentlemen.

JJ
[small][purple]Variables won't. Constants aren't[/purple]
There is no apostrophe in the plural of PC (or PST, or CPU, or HDD, or FDD, or photo, or breakfast...and so on)[/small]
 
C:\Documents and Settings\Administrator.domain>
would be the default path when you open a command prompt, do the commands work from there without doing the cd\
 
Finally got round to applying the suggested fix from Strongm, and it worked a treat.

Thanks, Strongm.

JJ
[small][purple]Variables won't. Constants aren't[/purple]
There is no apostrophe in the plural of PC (or PST, or CPU, or HDD, or FDD, or photo, or breakfast...and so on)[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top