question

HrachMartirosyan-5700 avatar image
0 Votes"
HrachMartirosyan-5700 asked ·

InstallPrinterDriverFromPackage 80070490 issue

Hi all,

I'm trying to call InstallPrinterDriverFromPackage function. This causes error 80070490`.
Just wanted to know possible reasons of this.

Thank you in advance.
Hrach Martirosyan

windows-hardware-wdk-general
· 13
10 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Note : Before calling InstallPrinterDriverFromPackage , UploadPrinterDriverPackage succeed
.

0 Votes 0 ·

Hello @HrachMartirosyan-5700, could you show how do you call InstallPrinterDriverFromPackage()?

0 Votes 0 ·

Thank you for quick response.

Sure

HRESULT hr = UploadPrinterDriverPackage(nullptr, inf.c_str(), nullptr, UPDP_UPLOAD_ALWAYS, GetDesktopWindow(), buff, &buffLen);
        if (SUCCEEDED(hr))
        {
            cout <<  "CDriverInstaller::InstallPrintDriverFromPackage: Upload successful";
            hr = InstallPrinterDriverFromPackage(nullptr, buff, name.c_str(), nullptr, IPDFP_COPY_ALL_FILES);
            if (SUCCEEDED(hr))
                {
                    cout <<  "Install successful";
                }
                else
                {
                    cout << "Install failed: ResultCode: " <<  hr;
                }
        }


0 Votes 0 ·

This code was working completely fine, but over the weekend Windows updated and now I have this issue

Maybe this will help :)

0 Votes 0 ·
RitaHan-MSFT avatar image RitaHan-MSFT HrachMartirosyan-5700 ·

Thanks for shared information. Could you try to narrow down this issue to see if it is related to the update? Like try another machine or uninstall the update. If it is update related you can show your OS version and update package number. And one suggestion is asking a question at Windows Hardware WDK and Driver Development forum because it is related driver development, for more professional support.

0 Votes 0 ·
Show more comments
CymonKilmer-4330 avatar image
0 Votes"
CymonKilmer-4330 answered ·

Were you able to narrow down what updates affected this?

10 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

09917186 avatar image
0 Votes"
09917186 answered ·

I recently got same error E_ELEMENT_NOT_FOUND (0x80070490) on calling InstallPrinterDriverFromPackage, which was obviously caused by UploadPrinterDriverPackage's parameter dwFlags UPDP_CHECK_DRIVERSTORE. When using UPDP_SILENT_UPLOAD instead, I never encountered any trouble, neither before nor after experimenting with UPDP_CHECK_DRIVERSTORE. I haven't tried UPDP_UPLOAD_ALWAYS, but I could well imagine that replacing it by UPDP_SILENT_UPLOAD could solve your problem.

10 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.