21

Using Windows 7, on just one of my machines, typing in "ipconfig" no longer does anything.

Is there a reason for this?

My speculation is that it has something to do with java SDK installation / changing the system variables.

The command and response:

C:\Users\Paul>ipconfig

'ipconfig' is not recognized as an internal or external command, operable program or batch file.

My PATH:

C:\Program Files\Common Files\Microsoft Shared\Windows Live;
C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;
C:\Program Files (x86)\MiKTeX 2.8\miktex\bin;
C:\Program Files (x86)\Windows Live\Shared;
C:\Program Files\Common Files\Microsoft Shared\Windows Live;
C:\Program Files\Java\jdk1.6.0_22\bin;
c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;
c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;
c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;
C:\Program Files (x86)\QuickTime\QTSystem\;
C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;
C:\Program Files (x86)\MATLAB\R2007b\bin;
C:\Program Files (x86)\MATLAB\R2007b\bin\win32;
C:\Program Files (x86)\Common Files\Autodesk Shared\;
C:\Program Files (x86)\Autodesk\Backburner\;
C:\Program Files\Common Files\Autodesk Shared\
8
  • 11
    What is the output of the command when you type it?
    – codewario
    Sep 13, 2011 at 15:53
  • yeah does it just output an empty line or what? and I take it there are adapters set up on that machine.. ;-)
    – gordatron
    Sep 13, 2011 at 15:57
  • 1
    Actually, can you post the output of "set path"?
    – codewario
    Sep 13, 2011 at 15:57
  • Ah, it doesn't look to be a path issue then (it would have said the command was not recognized). Can you open device manager and verify that your network adapters are all installed and not malfunctioning?
    – codewario
    Sep 13, 2011 at 15:59
  • As @MetalSearGolid asks, please post the output of "set path". Though I'd imagine if C:\Windows\System32 were missing from the path statement, ipconfig not running would be the least of your worries. Sep 13, 2011 at 16:20

9 Answers 9

20

I'd imagine if C:\Windows\System32 were missing from the path statement, ipconfig not running would be the least of your worries.

C:\Windows\System32 contains a large number of the executables and dynamic link libraries (DLLs) that allow Windows to function.

An entry in the system Path settings tells the computer to look in that specified location for executables and files that programs are referencing.

While it would seem that a good program would not rely on Path variables but should directly reference the location of any and every file it is dependent on, the Path statement allows multiple similar OSes to coexist on the same drive (Windows XP in the C:\WinXP\ folder, Windows 7 in C:\Win7\, etc, which would result in different and incompatible .\System32\ directories), and allows for more easy and flexible upgrading of framework files (look for the newest version of the .Net libraries in a versioned directory where they are installed rather than a central directory where they may overwrite each other in an undersireable way).

So a program looking to use the functions of Windows XP's built in zip handling would call zipfldr.dll and the OS will return the functions of that executable stored in C:\Windows\System32\zipfldr.dll. If you look through that directory, you should see many files that you'll probably recognize as common scripting commands or functions critical to the OSes operation.

I've never removed the C:\Windows\System32 entry from my path statement and I don't think I ever will (though I suppose testing this in a VM with rollback functionality shouldn't be too hard) and so I cannot say for certain what would happen if it were completely missing.

Suffice it to say, pretty much any batch script would completely not function, and the abilities of your OS would be severely curtailed.

Others have already noted how to add C:\Windows\System32 to the Path statement if it is missing, and so I'll not repeat that here. But I would not be surprised, since this is the only function you've found to be not working, if there were something else wrong here.

3
  • Cheers dude! I have added on the C:\Windows\system32 to the end of PATH as it was infact missing. Thers alot more in this list then when I first started with my pc, and maybe innocent face I had deleted it when installing Java SDK. It is probably the only cmd prompt command i actually use, so suffice to say that is why I only notice this one not functioning. Though, lately my computer has been acting weird! and showing strange colours, on MS programs.. But that is another question!
    – IAmGroot
    Sep 14, 2011 at 18:18
  • Well then I can say I've learned something as well. Leaving C:\Windows\System32 out of the Path statement isn't necessarily a precursor to the end of the world. It's annoying, but not life threatening. Glad I could help. Sep 14, 2011 at 19:36
  • I had the same issue after i inadvertently changed my Path directories when manually installing a Delphi IDE on Win7. I added the following three values back in then restarted and it fixed it: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
    – notidaho
    Jul 23, 2015 at 11:13
14

It could indeed be down to system variables.

  • Right click My Computer in Start Menu or on desktop and click Properties
  • Choose Advanced System settings -> Advanced
  • Click the Environment Variables... button
  • Find the system variable called Path and click it
  • Click Edit... button
  • It should be a long string with several paths separated by a semi-colons ;
  • Check it contains C:\Windows\system32 (I'm assuming your system drive is C)
  • If your not sure if it is correct then you might want to copy it and post it here.
  • If you make changes you may need to restart to see any effect

If this doesn't help then open your C:\Windows\system32 directory and ensure it contains IPConfig.exe. If it doesn't then I guess you must be missing system files.

1
  • When I open the Environment Variables dialog window as described, I see two types of Environment Variables: user and system variables. The %SystemRoot%\system32 path is included in the Path system variable.
    – Daniel K.
    Dec 15, 2021 at 14:33
2

I add the same problem, but when I type in a commande line (cmd.exe) the following

echo %PATH%

The %SystemRoot%\system32 was indeed present.

I read somewhere that the problem could be caused by a space following a semicolon in the definition of PATH variable, but this was not the case for me.

My problem was solved when I discovered that one of my PATH item was %SYSTEMROOT% instead of %SystemRoot% (case sensitive)

1
  • Environment Variables always worked for me regardless of the case, so I was skeptical, but I had the same situation, and this fixed it. Jun 10, 2020 at 6:12
1

You have to Run the command prompt as an administrator. By default, Windows 7 does not allow the command prompt system access. From the Start menu, right-click on Command Prompt and select Run as administrator. Now you will be able to run all the commands you expect to, like ipconfig.

3
  • 2
    No. The user would be asked to elevate if the command existed but did not have sufficient privileges. In the case of the OP, the command prompt can't even find the ipconfig program, let alone ask for elevation.
    – bwDraco
    Oct 22, 2012 at 0:07
  • 1
    From user R.D. Alkire: I had the same problem in win 8.1, "...not recognized...", but followed the answer from BrbnMn regarding Win 7, "...select Run as administrator" and it worked, despite the comment to the contrary.
    – fixer1234
    Nov 8, 2016 at 18:24
  • Running as Admin worked for me as well. The question would be why I had to do that? I was indeed seeing the "command does not exist" error message for a simple ping
    – Byron
    Jul 17, 2021 at 16:06
1

Another thing to check, which was the culprit in my case: the PATHEXT environment variable.

I had the user environment variable PATHEXT set to "*.LNK" in an attempt to get shortcut files picked up on the command line without typing the extension, but this was just shadowing the system environment variable PATHEXT=".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC", not adding to it. Thus, ipconfig.exe wasn't being found. Setting the user-level PATHEXT to the full list of extensions fixed it.

0

Check the Security settings of your Anti-Virus or Firewall. In my office laptop, unless the security level is set to "Off", it simply returns at the command prompt without any output.

0

I had problem with some commands in cmd like ipconfig. Then after I set the path for that it's working.

SYSTEM DLL PATHS 
C:\Windows\System32

for all windows inbuilt commands.

1
  • This was the answer to the question, but as you can see, this answer has already been given and accepted. Read the existing answers before adding your own to avoid duplicating what has already been suggested. Jan 6, 2017 at 18:03
-1

Try uninstalling and reinstalling your network card driver(s). I'm remembering now that I've seen this a long time ago in XP, and simply reinstalling the driver worked.

2
  • Not having any network adaptors installed would not cause the above error message.
    – Steve
    Feb 1, 2013 at 22:56
  • Doesn't change the fact that this fixed it for me. I'm not saying I understand why it worked but it did.
    – codewario
    Feb 4, 2013 at 15:44
-1

If all the above recommendation do not work try this:-
Type "ipconfig" on the search bar, right click on it then select "open location".
Then right click on the .exe file and run it as administrator and try again.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .