none
Get ERROR_EXE_MACHINE_TYPE_MISMATCH when install v3 print driver on 64-bit Windows 10 RRS feed

  • Question

  • Hi everyone,

    I've developed a v3 print driver(based on Unidrv) for our laser cutting machine, and it can be installed on 64-bit Windows 7 correctly.

    Build environment for driver on Windows 7:

    1. Windows 10 Pro

    2. Visual Studio 2015 Pro + WDK 10 + SDK10

    3. Set build configuration to x64.

    4. Set Windows 7 for Target OS Version of Driver Settings in project property.

    I use same build environment and change Target OS Version to Windows 10 or higher, build successfully. But when I try to install it on 64-bit Windows 10, I got error below.

    1. inf based installation.

    I try to use Add a printer function provided by system, follow instructions, after type a printer name, when I press next button, the dialog show installing driver progress bar and pop-up a user account control confirm dialog, after I press Yes, it return back to type a printer name step, and give no information, nothing happened.

    2. install application

    Then I try to use AddPrinterDriverEx function to install the driver, and get an ERROR_EXE_MACHINE_TYPE_MISMATCH error. I've checked build settings and found nothing wrong.

    And I've done same test on bitmap sample in print directory in Win7 DDK, get same results.

    Any suggestions to resolve this problem?

    Thanks a lot.

    Eric Zhang

    Monday, June 19, 2017 3:08 PM

Answers

  • After hours hard working, I've found the problem and corresponding solution.

    Because the driver is developed years ago, and tested only on Windows 2000, Windows XP and Windows 7 32-bit system,

    there is no reinforcement on driver signing, and there is no CatalogFile directive in my inf file, no Driver Kit integration with VS and no Driver Install Package.

    When I tried to install driver on Windows 10 and Windows 8.1, it can not pass the driver signing test. But I think it's better for the system to provide useful information on this condition to help developer to diagnose the problem.

    For the problem, I create a Driver Install Package for my driver, and build it for my inf file, generate a .cat file, install driver through Add a printer function provide by system, everything is OK, and same result with the bitmap sample of Win7 DDK.

    Eric Zhang

    Tuesday, June 20, 2017 2:37 PM