cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Reena_Kishore
Level 2

Need Help fo DIFxDriverPackageInstall, Device Driver installation

HI All 🙂 ,

I've had some problem with use this function "DIFxDriverPackageInstall ".
My Installation tool is: Installshield 2010 primer edition.
I want to install hardware for my company's bluetooth various system: windows xp(32bit/64bit),windows vista(32/64bit),windows 7(32/64bit).
Meterials i have are: DIFxAPI.dll,WdfCoInstaller01005.dll, variouse inf file, sys file associated cat file.
Project type i use: Pure InstallScript Project.
Debug enviroment: xp sp2 32bit.
In the Installshield 2010 primer help document there are some information to install the PNP device driver as follows:
----------------------------------------------------------------------------------------------
To install a 32-bit DIFx driver in an InstallScript project:
1.Open the General Information view.
2.In the General Information explorer, click Product Properties.
3.Set the DIFx Support (for 32-bit platforms) property to Enabled.
4.Add the DIFx driver files to the project.
5.Override the feature event for the feature containing the DIFx driver files and 6.either call the DIFxDriverPackageInstall function for non-Plug and Play (PnP) drivers or the DIFxDriverPackagePreInstall function for PnP drivers.
7.Build and run the installation
---------------------------------------------------------------------------------------------

I follow the tips above, copy the driver need files to the target directory.
And override the OnMoved function to explore the DIFxDriverPackagePreInstall();
but this function reture value is not ISERR_SUCCESS

BTW,the description about DIFxDriverPackagePreInstall:
----------------------------------------------------------------------------------------------
This function applies to InstallScript projects only. This function is not required in InstallScript MSI projects since DIFx can be called by the Windows Installer in those projects.

The DIFxDriverPackagePreinstall function preinstalls a driver package for a Plug and Play (PnP) function driver in the driver store and installs the .inf file for the driver package in the system .inf file directory. If all of the files associated with the driver are in a single component or you can guarantee that all appropriate driver files will be installed when this component’s Installed event is called, then the recommended place for calling this function is in the component containing the DIFx driver's Installed event. Otherwise, call this function in the installation’s OnMoved event.

If uninstall logging is enabled when this function is called, the driver pre-installed by this function is logged for uninstallation and is automatically removed by the OnUninstallingDIFxDriverFile event when the application is removed.
----------------------------------------------------------------------------------------------

Code i wrote:
---------------------------------------------------------------------------------------------
function OnMoved()
STRING szTargetPath,szMsg;
NUMBER nResult;
begin
szMsg = "begin install driver btathusb,please wait...";
SdShowMsg ( szMsg,TRUE );
szTargetPath = TARGETDIR ^ "btathusb.inf";
nResult = DIFxDriverPackageInstall ( szTargetPath,0,0);
Delay(15);
SdShowMsg (szMsg,FALSE);
if(nResult != ISERR_SUCCESS )then
abort;
endif;


-----------------------------------------------------------------------------------------------

I want to know why the driver can not be installed correctly.
Is there any other method applying to solve my installation problem.

Please give your suggestion as soon as possible. its very urgent task for me.

Thanks
Reena:mad:
Labels (1)
0 Kudos
(2) Replies
Holger_G
Level 10

I would recommend to install the driver package using DPInst.exe (part of DIFx, the latest WinDDK includes the latest DIFx redist files) in first place. If that works well without any errors you should investigate your InstallScript based setup.
Looking at your post I don´t see any detailed problem description. Have you checked any log files? Vista, for example, logs very detailled SetupAPI and DIFx results into windows\inf\setupapi.app.log and windows\inf\setupapi.dev.log.
0 Kudos
phill_mn
Level 7

Maybe by now you have this figured out, but for future readers, I would not override OnMove. Correct me if I am wrong but that override will prevent the default code in OnMove including the call to FeatureTransferData from happening, meaning that none of the files in your package will be installed. You need to put the DIFx code in the OnInstalled for the feature associated with you Driver's component group. Phill
0 Kudos