SetupCopyOEMInf fails in few systems having Windows 8.1 and Windows 10

Sr1004 1 Reputation point
2021-03-04T16:10:39.147+00:00

I am trying to install custom driver using the code

if(SetupCopyOEMInfW(arg, NULL, SPOST_PATH, 0, file,
ARRAY_SIZE(file), NULL, NULL))
{
}

SetupCopyOEMInfW returns false

where arg is path to the inf file

GetLasterror gives 2147418113 and sometimes 1906440435

Windows Hardware Performance
Windows Hardware Performance
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Hardware Performance: Delivering / providing hardware or hardware systems or adjusting / adapting hardware or hardware systems.
1,551 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Doron Holan 1,801 Reputation points
    2021-03-04T22:15:21.493+00:00

    What does setupapi.dev.log say about the attempt to copy?

    1 person found this answer helpful.