Page 1 of 1
DIFx for PnP driver
Posted: Fri Nov 10, 2006 2:35 pm
by zipzap
I need to pre-install a PnP Driver. The DIFxAPI call is:
DriverPackagePreinstall
Is there a way to do this from InstallAware?
Posted: Sat Nov 11, 2006 3:05 pm
by MichaelNesmith
You don't need to manually call APIs. Just add your driver files to your project, and then use the Advanced Options | Drivers view, click the New button, choose the driver INF, and just pick your options.
Posted: Mon Nov 13, 2006 11:57 am
by zipzap
I copied the .inf, .sys, and .cat files to a separate folder in the TARGETDIR. I added a driver install in the advanced options section.
For some reason it returns Failed true, with zero Installed and Copied.
Is there something else I should try?
Posted: Mon Nov 13, 2006 2:18 pm
by MichaelNesmith
I'd try to call DifX manually from the command line and see what I get. Also run the built in driver installation sample to see if that works for you.
Posted: Mon Nov 13, 2006 4:11 pm
by zipzap
Ok, I got it to work with the DIFxAPI.dll. I got the DIFxAPI.dll from the WinDK (RC1).
Here's what is working:
1) I copy my .inf, .sys, and .cat to $TARGETDIR$\\drivers
2) I copy the DIFxAPI.dll to $TARGETDIR$\\drivers
3) Call DLL Function $TARGETDIR$\\drivers\\DIFxAPI.dll with
function: DriverPackagePreinstall
arg1: $TARGETDIR$\\drivers\\mydriver.inf
arg2: 0
4) Delete Files $TARGETDIR$\\drivers\\DIFxAPI.dll (cleanup)
Works great.