- How copy INF on Windows 2000?
- Posted by Hannes on April 27th, 2006
Hi,
How can an INF file be copied to %windir%/inf/ using INF file directives
on Windows 2000? CopyFiles should NOT be used for INF files, according to the
documentation, and CopyINF only works on Windows XP (according to the same
documentaton).
Background, if needed:
To install an NDIS IM driver, I am using two INF files, per the PASSTHRU
example provided in the Windows DDK. The INF files provided in the example
WORK but generate installation errors in SetupAPI.log, claiming that "this is
not an approved method of copying INF files, use CopyINF instead". Fine, but
our installer has to work on Windows 2000 as well as on XP.
Any help appreciated,
/ Hannes.
- Posted by Eliyas Yakub [MSFT] on April 28th, 2006
To enable the use of CopyINF directive on Windows 2000, MS ships a
redistributable coinstaller DLL called cocpyinf.dll in the DDK
(WINDDK\3790.1830\tools\coinstallers\x86) that you can refer in your INF
file. This coinstaller will then parse the CopyINF directive in your INF and
do the copy operation.
But, you wouldn't able to use a coinstaller in an NDIS IM INF file because
the main install file is not a PNP INF file. So the solution is to do what
the copcpyinf does either in your installer program or in the notify object
DLL that you can refer in your INF file.
Years ago, I demonstrated how to do this as part of MUX notify object DLL.
Take a look at the old DDK XP DDK (2600.1106) MUX\notifyob\setupdi.cpp. If
you don't have that DDK, send me a private email note and I will be happy to
email it to you.
--
-Eliyas
This posting is provided "AS IS" with no warranties, and confers no rights.
http://www.microsoft.com/whdc/driver/kernel/KB-drv.mspx
- Posted by Hannes on May 1st, 2006
This would imply that the original PASSTHRU example is violating the rule
that CopyFiles may NOT copy any INF files.
Can we leave our Windows 2000 INF files as-is (based on PASSTHRU) or will we
face issues if we copy the INF file as the PASSTHRU example dictates?
We are having random install/uninstall issues on Windows XP (currently using
same INF as Windows 2000), and I am wondering if using CopyFiles to cope the
INF could be the cause of this.
/ Hannes.
- Posted by Eliyas Yakub [MSFT] on May 2nd, 2006
CopyFile will copy INF file to the INF directory but it wouldn't preprocess
the INF, which is important for the device installer. A preprocessed file
(.PNF) file has other information such as the source media, directory, path
to the catalog file, etc that a regular INF doesn't have. When you use the
CopyINF directive, the system preprocesses the INF and copies it to the INF
directory as oemxxx.PNF. This enables the system to automatically find the
relevant pieces during install.
I can't say for sure that your install/uninstall issue is related to this
but I would fix the package to use a notify object to copy the INF file
using SetupCopyOEMInf on Win2K.
I vaguely remember that one of the Win2K service packs (SP4) was fixed to
handle CopyINF directive in INF file. I think you should contact DDK support
and ask them to check on that.
--
-Eliyas
This posting is provided "AS IS" with no warranties, and confers no rights.
http://www.microsoft.com/whdc/driver/kernel/KB-drv.mspx