IExpress wizard is not able to find the driver packages

Discussion in 'Windows Vista Drivers' started by rupa, Jan 17, 2008.

  1. rupa

    rupa Guest

    Hi All,

    I am trying to write an installer using DPinst.exe.

    My driver packages are:
    1) .inf file
    2) 2 .sys files
    3) dpinst.xml
    4) dpinst.exe

    Now I have one additional requirement. I want to run some code
    ( executable ) before dpinst.exe is executed by IExpress wizard.

    So I write the following code in myexe.exe:

    const char *argarray[4];

    argarray[0] = "dpinst";
    argarray[1] = "/lm";
    argarray[2] = "/f";
    argarray[3] = NULL;
    intptr_t handle = _spawnve( _P_NOWAIT , "C:\\Documents and Settings\
    \xyz\\installer\\geminiPackages\\dpinst.exe", argarray, 0);

    This piece of code is calling dpinst.exe from myexe.exe.

    Now I provide myexe.exe in the "Install Program to Launch" wizard page
    of IExpress where I give Install Program as "myexe.exe" and create
    install.exe as a self-extracting package.

    Problem is when i try to run the install.exe, it does starts the
    dpinst.exe with the custom page ( which means it definitely read
    dpinst.xml) however it finishes up saying

    "Cannot complet the Device Driver Installation Wizard"
    I checked the dpinst.log and it says
    INFO: ****************************************
    INFO: 01/16/2008 16:22:29
    INFO: Product Version 2.0.1.0.
    INFO: Version: 5.1.2600 Service Pack 2
    INFO: Platform ID: 2 (NT)
    INFO: Service Pack: 2.0
    INFO: Suite: 0x0100, Product Type: 1
    INFO: Architecture: X86.
    INFO: Interactive Windows Station
    INFO: Command Line: 'dpinst /lm /f'
    INFO: ****************************************
    INFO: Current working directory: 'C:\DOCUME~1\bshah\LOCALS~1\Temp
    \IXP000.TMP'
    INFO: Running on path 'C:\DOCUME~1\bshah\LOCALS~1\Temp\IXP000.TMP'
    INFO: User UI Language is 0x409.
    INFO: Install option set: legacy mode on.
    INFO: Install option set: Force install if driver is not better.
    ERROR: No driver packages found.


    Now If i give dpinst.exe as the install program location then
    everything works fine. Driver packages are also found.

    its just when we try to run dpinst.exe from another exe , driver
    packages are not located.
    Can any one please throw some light into this issue?

    Thanks
    barkha
     
    rupa, Jan 17, 2008
    #1
    1. Advertisements

  2. rupa

    Pavel A. Guest

    INFO: Current working directory: 'C:\DOCUME~1\bshah\LOCALS~1\Temp
    \IXP000.TMP'
    INFO: Running on path 'C:\DOCUME~1\bshah\LOCALS~1\Temp\IXP000.TMP'


    Have you noticed these lines?

    --PA
     
    Pavel A., Jan 18, 2008
    #2
    1. Advertisements

  3. rupa

    Tim Roberts Guest

    Yes. You have hard-coded the path to dpinst.exe, and it's not the path to
    the install directory. Dpinst only looks for INFs in the directory that
    contains dpinst.exe. Your myexe.exe should skip the directory when calling
    dpinst.exe, or at the very least, go fetch the current directory and build
    the actual path.
     
    Tim Roberts, Jan 18, 2008
    #3
  4. rupa

    rupa Guest

    Here you go:
    I am building the path to dpinst.exe by extracting the current
    directory path and also placed driver packages, dpinst.exe at the same
    location. Nothing is hard code but still it doesn't works.

    TCHAR DriverPackageInfPath[MAX_PATH];
    TCHAR * InfPath = argv[0];
    // Prepare the string
    _tcscpy(DriverPackageInfPath, InfPath);
    argarray[0] = "dpinst";
    argarray[1] = "/lm";
    argarray[2] = "/f";
    argarray[3] = NULL;

    char *ptr1 = _tcsrchr(DriverPackageInfPath, ch);
    *ptr1 = 0;
    _tcscat(DriverPackageInfPath, _T("\\dpinst.exe"));

    intptr_t handle = _spawnve( _P_NOWAIT , DriverPackageInfPath,
    argarray, 0);
    return 1;
     
    rupa, Jan 23, 2008
    #4
  5. rupa

    rupa Guest

    I agree with you thats why its definitely able to find dpinst.xml
    which is also placed at the same location where dpinst.exe is there.
    How I can tell that it is able to find dpinst.xml because i can see
    dpinst.exe changed the welcome gui as described in dpinst.xml. Now if
    it can find xml, then why is it not able to find driver packages?

    thanks
     
    rupa, Jan 23, 2008
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.