Jump to content
MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. ×

HowTo: Get your INF and driver files from an EXE...


Recommended Posts

Hi all,

I searched the forum and did not immediately see any mention of this topic, and I wanted to offer some help from my experiences with the issue.

Problem: You cannot integrate your drivers into nLite because the drivers are in an EXE file such as SETUP.EXE.

Answer: I have used two ways to get around this problem in the past, and both work:

Note: I must apologize - I had intended this to be a short message, but then I got into my Technical Writer mode and it's become somewhat long, but hopefully accurate and helpful.

A) The first method is to look in C:\Windows\INF for your INF file. If you point nLite to that INF, it will be able to get what it needs from there - including the driver files and and other gadgets such as System Tray applets. I have even used this technique to install drivers from one Windows PC to another when I could not obtain the appropriate driver installation files. All one need to do is share the C:\ drive to the other PC over a network and point the Update Driver applet in Windows to the \\Sharename\Windows\INF\MyFile.INF, or map a drive letter if it gets cranky. Then it proceeds normally as if it's getting the drivers from a server full of driver files.

BUT - What to do with 10,000 INF files in the C:\Windows\INF folder when you do not know which one you need?

Do the following:

01) Go to Device Mangler and find your device.

02) Right-click it and choose Properties.

03) Click the Driver tab.

04) Click the Driver Details button.

05) This will bring up a window with a list of driver files for the device. If there are few files, this makes it easy. If there are many files, you will have to make some educated guessing. Pick a file, and note it's complete filename. The best files to pick are those ending with SYS and/or those in the C:\Windows\System32\Drivers folder.

06) Close all the device driver property windows, and Device Mangler too.

07) Open up Windows Explorer and go to C:\Windows\INF folder.

08) Press F3 for the search feature.

09) If the mutt is there, throw him a bone and go to Advanced Files and Folders Search.

10) Type *.INF in the file name box.

11) Type the name you noted of the driver file into the 2nd box. The box is called "words to look for" or whatever.

12) Click the Search button and wait for results.

If you are lucky, you will only get one file result, or two. If you are not lucky, you will get many. The problem here is that you picked a file to search for that is used by many types of hardware, or it happens to be a Windows system file. Go back to the Driver Properties window and pick something else. Eyeball the filenames closely and try to pick something that looks unique to the device or the manufacturer, and then search again.

13) Once you have one or two INF files as candidates, open them up with Notepad and read them. You can just double-click on them and they will open as text files in Notepad automatically. Otherwise, right-click and choose "Open With", or use the Choose Program window, or...it's a text file, just open it in Notepad. I'll let you figure it out. =-)

The INF file is pretty self-explanatory BUT DO NOT EDIT ANYTHING. And when you close Notepad DO NOT SAVE THE FILE in case you happened accidentally to click an extra character or space by mistake. I have never done this before. Nope. Never. =-P

Essentially what you have to do at this point is confirm the file is the correct one you are looking for. There are two places to do this: at the very beginning of the file, and at the very end. Most INF authors will put some kind of comments at the top that say what device the file is for. And at the very end there is usually a block of text strings in quotes, with various phrases that show up in the pages of the installation windows. What you are looking for is the name of the device as it appears in Device Mangler.

For instance, my ethernet adapter appears under "Network Adapters" with the title "Broadcom NetXtreme Gigabit Ethernet". This title is what to look for in the INF file. Press F3 to use the search feature if you need to. Once you find that title text, you can say bingo and know it's the INF file you are looking for.

B) If the above method does not work, and you do have access to the SETUP.EXE file, this 2nd method might work. This assumes the EXE file is a self-extracting archive, such as made by WinRAR or the Microsoft Installer program. This method assumes that a) the EXE decompresses the INF and related driver files into a temporary folder before handing them off to Windows to be installed, and b) it stops for user input at some point by opening windows at you with Next and OK buttons and so forth.

If the installer is one of those whiz-bang EXE files that runs all the way through with no user input, this make it more difficult, if not impossible. See Note #1 below about this problem if it arises.

Regardless of the type of EXE file, the trick is to find the INF and driver files in that temporary folder while they are there, and grab them before the installer completes, exits, and deletes them. Proceed as follows:

01) Run the EXE file.

02) When it opens up windows at you, click the "Next" buttons until you get to a point where it's ready to install the drivers, but then STOP. You don't want to go that far. The trick is to get it to where it decompresses the files, but hasn't deleted them yet. If at this point you find that it has not decompressed the files, and it seems it does so in a batch between that page and the page that follows, that is the same as the whiz-bang file mentioned above, and you will have to refer to Note #1.

03) Now that the INF and drivers have been decompressed, you have to wander around your hard drive to search for something which you don't know the name of. But we can narrow this down to the following folders:




C:\Documents and Settings\YOUR-USER-NAME\Local Settings\Temp


..and there may be more...

04) Open up Windows Explorer and go to each of these folders in turn.

05) Press F3 to open the search feature.

06) In the filename box, type *.INF.

07) Press the Search button.

08) If you get very few INF files in the search results, it will be an easy matter of opening each one to see if that's it. If you find that you're not sure, you will have to use the techniques listed in the first method above, to look in Device Mangler and find the proper name of your device.

09) Once you find the correct INF, that will point to the other driver files you need. You'll have to use your head here. Look at the folder the INF file is in, and determine if that is the root of a collection of other folders with other INF and driver files, or simply a single folder with a small number of files. In general if you can pinpoint the folder the INF file is in, that's good enough.

10) Now that you know the folder the INF is in, right-click on it, and click Copy. In my experimentations, I have found that some setup programs place locks on the files and folders, so that it the reason to Copy and not Cut. Also I have seen the Setup bomb out with errors if the files suddenly disappear, and then it leaves other junk lying around in the temp folders.

11) Go elsewhere on your system and Paste the folder there. Quickly. Before the setup program finishes and deletes the files halfway through the copy process. In this case you might not know it happened if Windows doesn't pop an errors at you saying something like "Error: File has mysterously disappeared before it could be copied.", in which case your nLightened installation of Windows might mysteriously fail for no discernible reason when it tried to install that driver. Or it might pop up that annoying window that says "Windows needs the file X to continue installing...blah blah."

12) Rename the new folder from ~ABC123.TMP or whatever to something like MyVideoDriver.

13) Cancel out of the SETUP.EXE and let it clean up after itself.

Note #1: Sometimes the setup program will decompress, install, and delete the files you are looking for, in one operation. If that happens, you might have to use the first method described above, by digging in the Windows\INF folder. If this does not work, or you are just a masochist, there might be a way. It's basically the mouse-clicking equivalent of swatting flies. What you have to do is this:

01) Go to one of the temp folders in Windows Explorer.

02) Stare at it.

03) Seriously! LOL

04) Run the EXE file and quickly bring Explorer back to the front.

05) Press F5 repeatedly until you see temp files and/or folders pop in.

06) As quickly as you can, highlight them.

07) Press Ctrl+C and Ctrl+V in quick succession.

08) This *should* create copies of those items right in the same folder, but all with the prefix "Copy of xxx.yyy".

09) Then just follow the same procedures listed above to make sure you got the right INF and driver files.

10) If this method is not immediately successful, you can't find the right temp folder, or files, and/or you get frustrated, and/or you're just crazy and/or obsessed like me, you *could* use the SysInternals utility FileMon.exe to monitor the Setup program to see what it's doing, where it's dumping its files, and what the names are, and go from there. But that's way off-topic and only for the institutionally whacky, terminally bored, unemployed, and/or chronic insomniacs, and I'll leave it for those of them that know how to do it already. =-P

= = = = = = = = = = = = =

No matter which of these methods you use to get your INF and driver files, once you have the correct ones, feed them to nLite, and off you go..!

= = = = = = = = = = = = =

Hopefully this will work for you. If not...well, I dunno what to tell you more... =-(


Link to comment
Share on other sites

A big WOW! on your step-by-step description :-)

You've certainly gone through a lot of methods, which can be quite boring to write down, and I must say you've even got the Staring part right hehehe.

I use the Universal Extractor here and it helps most of the time, as well as WinRAR or the all-time favourite here, 7zip.

Keep on the good work.

Link to comment
Share on other sites

That's a hell of a first post! Welcome :hello:

I too just use Universal Extractor and 7zip. It's really amazing what 7zip can open.

Link to comment
Share on other sites

Hehe.... Thx.

I've been sitting here fiddling with nLite at work for like most of this week... It's a f***ing fantastic program..!!! I'm trying to create a common Windows share with all the tweaks already tweaked so I can clean up our desktops, and blast out all the worms and browser hijackers that have been running the show here. I just started at this company and its a serverless peer workgroup with about 50 desktops on a cable modem/router and its a frightening mess... I don't know how anyone gets any work done...

I will have to fiddle with these programs Universal Extractor and 7zip. I just learned of the 7zip format last week.

Link to comment
Share on other sites

Let me start by thanking you for your first post and its associated content.

Please ensure whilst utilising this software that your read and adhere to any licensing agreement!

Link to comment
Share on other sites

with method 1 i

10) Type *.INF in the file name box.

11) Type the name you noted of the driver file into the 2nd box. The box is called "words to look for" or whatever. (just typed the name or partial name of the drivers name from device manager i didnt go into properties and look for sys. and found them quite easily cheers)

12) Click the Search button and wait for results.

also found if u click the service in the drop down menu in device details tab it may list the filename of the actual inf has been correct for the few i have looked for

also i have pointed nlite to the inf in c:\windows\inf\ and tried to do to for a few files but get an error "this driver folder is already queued for integration no need to select more than 1 inf file from the same folder"

can i just copy the inf to a different folder or do i need other files aswell

Edited by b-man
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.

  • Create New...