Ron Jackson wrote: > I would like to write a python program to install a driver inf file in > Windows. The information I have seen suggests that this would best be > done using SetupCopyOEMInf(). > > Is SetupCopyOEMInf() accessible through python-win32? > > It looks like the PnPUtil command might provide an alternative way to > install the inf file. > <http://msdn.microsoft.com/en-us/library/ff550423%28v=vs.85%29.aspx> > > The inf file I want to install is for a USB Communications Device > Class gadget, and with the inf file installed it properly enumerates > as a communications port. > > Has anyone installed an inf file in Windows through a python program?
There's more to it than that. What you want to do is have your driver package installed to the "driver store". That way, Device Manager can find the package automatically when the device appears. It is possible to use "pnputil -i -a xxx.inf" to do that, and you should try that on a virgin system to see if it works for you, but in most cases it's better to use DPInst. That is is a tool that ships in the WDK that is designed for pre-installing driver packages. You put DPInst.exe in the same directory as the CAT, INF, and SYS files, then run "DPInst /lm". You can use a short XML directive file to customize its behavior. REMEMBER that you need different drivers on 32-bit and 64-bit systems. It's possible to make a single driver package that includes both, but many vendors supply a different package for each, because Microsoft is preferring that. If you do with DPInst, you need to use the matching bittedness for it as well. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc.
_______________________________________________ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32