none
Problem loading a driver on vista RRS feed

  • Question

  • Hi everyone,

    I have been developing a driver on a Windows 7 machine. It works fine on Windows 7 (both 32 and 64 bits) but when I try to port it to Vista (using the the Vista build environment of the WDK) the driver cannot start .

    Whatever method I use, registering the service works fine but when I try to start the driver I get an error code (2) FILE_NOT_FOUND.

    For instance, I usually do the following:

    sc create MyServ type= filesys binPath= C:\mydriver.sys (which workins fine)
    sc start MyServ (which gives an error code 2 although the file exists)

    I am using the TESTSIGNING mode for my driver is signed (with a selfsigned certificate for now).

    Does anyone have a suggestion to solve this problem?

    Best regards,

    Robert Mandi

    Wednesday, June 26, 2013 6:29 AM

Answers

  • Just forgo the binpath and put the driver in system32\drivers which is the default location

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, June 27, 2013 12:13 PM
  • Maybe the driver has imports that do not exist in Vista (yes even if you build for Vista target, or think so). Verify this with dependency viewer. 

    Sympathies for having to support Vista.

    -- pa

    • Marked as answer by Robert Mandi Friday, June 28, 2013 8:14 AM
    Thursday, June 27, 2013 2:47 PM
  • That was indeed a problem of import. I was using cng.lib for crypto on 7 and ksecdd.lib must be used on Vista.

    I have a new problem though, related to this. A cryptographic signature generated on 7 is valid on 7 but not on Vista (although the encryption/decryption stays fine). Does it mean I have to generate two signatures each time (one on 7 and one on vista) or is there something else possibly wrong?

    Friday, June 28, 2013 8:18 AM

All replies

  • Is it actually possible to load a driver on Vista without an INF file?
    Thursday, June 27, 2013 8:17 AM
  • Hi Robert,

    As far as i know INF file is required only for 64bit OS not for 32 Bit OS.

    To answer your question, Try using like below to locate the file

    \\SystemRoot\\C:\\temp.txt  or \\DosDevices\\C:\\temp.txt

    Regards,

    Muthu

    Thursday, June 27, 2013 9:35 AM
  • Just forgo the binpath and put the driver in system32\drivers which is the default location

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, June 27, 2013 12:13 PM
  • That was indeed a problem of import. I was using cng.lib for crypto on 7 and ksecdd.lib must be used on Vista.

    I have a new problem though, related to this. A cryptographic signature generated on 7 is valid on 7 but not on Vista (although the encryption/decryption stays fine). Does it mean I have to generate two signatures each time (one on 7 and one on vista) or is there something else possibly wrong?

    Friday, June 28, 2013 8:18 AM
  • If vista and 7 treat your signing differently, try using the vista signed driver on 7. If it loads, use the vista compatible signing

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Saturday, June 29, 2013 12:20 AM