Results 1 to 3 of 3

Thread: Need Help fo DIFxDriverPackageInstall, Device Driver installation

  1. #1
    Join Date
    Dec 2009
    Posts
    1

    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
    Last edited by Reena.Kishore; 12-03-2009 at 07:11 AM.

  2. #2
    Join Date
    Apr 2002
    Location
    Germany
    Posts
    683
    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.

  3. #3
    Join Date
    Sep 2003
    Location
    Minneapolis, MN
    Posts
    221

    I would not override OnMove

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •