I can run âipconfigâ in a Windows Command Prompt on my desktop, but
if I run it on my laptop I get: ââipconfigâ is not recognized as an
internal or external command, operable program or batch file.â
What do I do?
ipconfig is a standard Windows utility and should be part of your
installation by default. Obviously, for some reason itâs not.
Weâll look at a few ways to see if you have it, where it might be,
where else it might be, and how to get it where it should be.
Become a Patron of Ask Leo! and go ad-free!
Iâll use âipconfig.exeâ as an example, but in reality this applies
to almost any file thatâs a part of Windows.
The first thing weâll attempt is to search for the file on your hard
disk. Again, in the Command Prompt:
\
C:\>dir ipconfig.exe /S
The âcdâ command changes the current directory or
folder. Normally when you open a command prompt, the current directory
is the directory associated with your user account. Weâll want to
search the entire hard disk, which means we want to be at the top level
directory to do that search. That directory is referred to as
â\â, so âcd \â takes us there. You can see that
reflected in the prompt that results on the next line, as it shows you
the current directory.
the file on your hard disk.â
The âdirâ command produces a listing of files, or a
âdirectoryâ. We ask it to show a list of all files named
âipconfig.exeâ, and the â/Sâ parameter says âsearch the current folder
and all folders within itâ. When executed at the top level directory
âdir /Sâ scans the entire hard drive.
On my system that results in:
Volume in drive C is NOTENQUAD Volume Serial Number is E852-AA62 Directory of C:\WINDOWS\$NtServicePackUninstall$ 07/27/2007 04:00 AM 55,808 ipconfig.exe 1 File(s) 55,808 bytes Directory of C:\WINDOWS\ServicePackFiles\i386 04/14/2008 05:42 AM 55,808 ipconfig.exe 1 File(s) 55,808 bytes Directory of C:\WINDOWS\system32 04/14/2008 05:42 AM 55,808 ipconfig.exe 1 File(s) 55,808 bytes Total Files Listed: 3 File(s) 167,424 bytes 0 Dir(s) 176,697,344,000 bytes free
As you can see, ipconfig.exe is in several places, including
âC:\WINDOWS\system32â, where itâs supposed to be. In your case itâs
apparently not there.
The other places you might find it include:
- C:\WINDOWS\ServicePackFiles\i386 this would
typically be the most recently applied service pack, and hence a fairly
reasonably up-to-date copy of the file. This is probably the copy that
I would choose to use below. - C:\WINDOWS\$NtServicePackUninstall$ this is the
previous version of the file prior to that service pack. This is
retained so that you can uninstall the service pack and revert to the
previous version of this, and all files affected by the service
pack. - C:\I386 not listed in my example, since I have
installation CDs, but many manufacturers will place a copy of the
Windows install files in this folder in lieu of (or occasionally in
addition to) giving you an install CD. This would be the version of the
file as originally installed on your machine. Be sure to see the note
below about compressed files. - D:\Windows\System32 I include this specifically
because many manufacturerâs often include a copy of your Windows
installation on a recovery partition. On my laptop that happened to be
the âD:â drive. If you donât find what youâre looking for on your
primary Windows drive, and you have a separate recovery partition, itâs
worth searching that as well.
Regardless of which one you choose, you can simply copy the file to
where it was supposed to be (C:\Windows\system32, for example), or to
some other appropriate place where you can use it. Depending on the
file it may, or may not be safe to use it in the place that you found
it, so I recommend making a copy so as not to inadvertently damage the
contents of that location.
If you donât find the file, youâll need to grab your Windows
installation CD or DVD. Much like the âC:\I386â example above, that
vast majority of Windows files are in a folder â\I386â on the
installation CD, and you can just copy them directly from the CD to
where they belong in your existing Windows installation.
If you donât have an installation CD, and all youâre attempting to
do is replace a missing file or files on your legitimate and legal
installation of Windows, itâs seems to me that itâd be perfectly valid
to go out and borrow an installation CD from which to copy the files.
Be sure that itâs the same version of Windows â it may not matter for
some files (like ipconfig.exe), but for others itâs actually quite
critical that the Windows version match.
Compressed Files: on installation media and copies
of installation media individual files are often compressed to save
space, and youâll need to decompress them before they can be used.
Compressed files also have a modified name â the last character of the
extension is replaced with an underscore. That means that instead of
searching for âipconfig.exeâ in our example, we would
look for âipconfig.ex_â.
Once youâve located âipconfig.ex_â youâll need to decompress it:
c:\t\ipconfig.exe
What Iâve done with the command above is used the
expand command to decompress ipconfig.ex_ into
ipconfig.exe, placing the later in a temporary folder on my hard drive.
âF:â is my CD drive with the Windows installation CD installed, and the
compressed file was located in the I386 folder.
The results look like this:
Microsoft (R) File Expansion Utility Version 5.1.2600.0 Copyright (C) Microsoft Corp 1990-1999. All rights reserved. Expanding ipconfig.ex_ to c:\t\ipconfig.exe. ipconfig.ex_: 17105 bytes expanded to 49664 bytes, 190% increase.
The bottom line is that missing Windows files may be found in
several locations, both on your hard disk and on your original
installation media. Be sure to look for compressed versions as well,
which can then be easily decompressed before use.
Is it possible that the laptop is still running Win98/ME? If it is you would need to use winipcfg instead of ipconfig.
Is it correct that whenever my networkadapter is not available, ipconfig is also not working and the same error appears?
19-Oct-2008
Iâm curious as to why you went to the command prompt.
Why not just use the Windows Search command.
28-Oct-2008
All of a sudden I have LOST Windows Autocheck files.I get a warning that this will be skipped . How do I find and replace this file?
Hi,
I cant understand that procedure plz tell me in easy way can you?
im using windows xp sp3