Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

Where Can I Find a Missing Windows File?

Question:

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:\Documents and Settings\LeoN>cd
\

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 first thing we’ll attempt is to search for
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:

[F:\I386]expand IPCONFIG.EX_
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.

Do this

Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.

I'll see you there!

5 comments on “Where Can I Find a Missing Windows File?”

  1. Is it correct that whenever my networkadapter is not available, ipconfig is also not working and the same error appears?

    ipconfig should be found, and give you a different error stating that there’s no network adapter.

    – Leo
    19-Oct-2008
    Reply
  2. I’m curious as to why you went to the command prompt.

    Why not just use the Windows Search command.

    Personal taste. I find the command prompt much easier to use and much more flexible. But yes, you can use Window’s search as well, as long as you remember to uncheck or check all the appropriate options so that it actually searches everything you think it should.

    – Leo
    28-Oct-2008
    Reply
  3. 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?

    Reply

Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.