Archive: InstDrv plug-in 64 bit


InstDrv plug-in 64 bit
hi,

I want my installer to enable to install 64 bit hardware drivers on 64 bit system. But "InstDrv plug-in" web page says the plug-in does not work to install drivers on a 64-bit Windows version.

So is there a solution to install drivers on 64 bit system?

Thanks in advance.


Can anyone help me?


Originally posted by yz6307
Can anyone help me?
I'm wondering the same thing.

no solution?


Originally posted by yz6307
no solution?
Yes and no.

I had the same problem, as I needed to write an installer for hardware device drivers for 32bit and 64bit OSes.

Microsoft recommends using DIFxAPI. DIFx is a nice framework with just 4 or 5 DLL functions to install/uninstall a driver.
For the 32bit version it's not too difficult to do the calls using the System plugin.
64bit: The 32bit installer CANNOT call any function in a 64bit DLL. There's definitely no trick or workaround for that!

So I ended up writing a wrapper EXE for DIFxAPI to be compiled twice by WINDKK, one for 32bit (Win2K buildenv) and one for 64bit (W2K3 64 buildenv) and calling the appropriate exe from my installer. The 64bit exe then calls the 64bit version of DIFxAPI.

Meanwhile the little wrapper does everything else/special we need to install/uninstall our drivers.
Sorry that I cannot share this code.

I forgot to mention that Microsoft has a nice little example of how to use DIFxAPI which can be used to build such a 32/64 bit application in the Windows DDK.

c:\WinDDK\7600.16385.0\src\setup\DIFxAPI\DIFxCmd\

IMHO: Two functionality need to be added: ScanForHWChange
(Scan for Hardware changes, CM_Reenumerate_DevNode_Ex) like in the Device Manager and WaitWhileInstallationInProgess (CMP_WAITNOPENDINGINSTALLEVENTS_PROC from cfgmgr32.dll)

Vista (and above) provide the little command line tool pnputil.exe to enumerate, install and uninstall driver packages. Can nicely be called from NSIS.