9

This question is related to this one. Also, I think it's not duplicate of this question, since I'm not asking about specific device but a more general case.

Where can I find information about driver .inf files and how windows checks if they are usable? I know that many people do modify .inf files so there must be some information on the Internet.

Basically I have a bad .inf file and would like to see what's wrong with it and how to fix it if possible.

AndrejaKo
  • 17,023
  • 20
  • 79
  • 128

3 Answers3

10

In order for the "Right Click/Install" method to work, there must be a [DefaultInstall] section in the INF file and, potentially some other "Default" sections:

[DefaultInstall.Service] 
[DefaultUninstall]
[DefaultUninstall.Service] 

http://msdn.microsoft.com/en-us/library/windows/hardware/ff547465(v=vs.85).aspx

If there is no [DefaultInstall] section, you get the message “The INF file you selected does not support this method of installation.”

greatwolf
  • 2,088
  • 1
  • 17
  • 30
MrTheV
  • 101
  • 1
  • 3
3

You might try to select the inf file from Device Manager:

Right-click the device, select Update Driver Software, then Let me pick, click Have disk, Browse to the inf file and install.

If this doesn't work, I don't believe you can fix the inf file. The product you have probably doesn't match your operating system (it might be 32-bit when your Windows 7 is 64-bit).

You can also give more information, such as posting the inf file (actually the entire product, if possible).

harrymc
  • 455,459
  • 31
  • 526
  • 924
  • The .inf is correct because it did work on vista (but device manager method does not work for me on seven). I have 64bit seven and 64bit driver. I was asking here for general causes. [Here](http://superuser.com/q/181716/36601) is my question about my specific problems with my card reader. – AndrejaKo Nov 15 '10 at 15:59
  • You could also try to right-click the inf file and choose Install. Some inf files are funny this way, and will only work in one way, generating otherwise the above message. – harrymc Nov 15 '10 at 16:54
3

INF files format reference: http://msdn.microsoft.com/en-us/library/ms764958(v=VS.85).aspx

It would help to read the Creating Setup Applications (http://msdn.microsoft.com/en-us/library/aa376920(v=VS.85).aspx) page to learn the sequence followed, so you can step through the INF manually. I suppose a programmer could attach a debugger to setup and figure out what its failing on.

Robert Kerr
  • 755
  • 2
  • 14
  • 25
  • Unfortunately there's no debugger for INF files. Attaching a debugger to setup.exe would not be much useful unless you had setup's source code and private symbols. – Jamie Hanrahan Mar 09 '19 at 04:16