DIFx for PnP driver

Got a problem you cannot solve? Try here.
Post Reply
zipzap
Posts: 17
Joined: Wed Nov 08, 2006 2:01 pm

DIFx for PnP driver

Post by zipzap »

I need to pre-install a PnP Driver. The DIFxAPI call is:
DriverPackagePreinstall

Is there a way to do this from InstallAware?
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post 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.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
zipzap
Posts: 17
Joined: Wed Nov 08, 2006 2:01 pm

Post 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?
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post 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.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
zipzap
Posts: 17
Joined: Wed Nov 08, 2006 2:01 pm

Post 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.
Post Reply