question

HrachMartirosyan-5700 avatar image
0 Votes"
HrachMartirosyan-5700 asked Hebert-Seven edited

Printer Driver Adding Error

Hi,

I I'm having issues with Add-PrinterDriver "printerDriverName".

I can succesfully call pnputil.exe -i -a "path_to_inf_file.inf". It shows that driver is successfully added.
But afterwards I have to call Add-PrinterDriver "printerDriverName"., which shows

An error accoured while preforming the specified operation. See the error details for more information.

Category info : ObjectNorFound(MSTF_PrinterDriver:Root/StandardCimv2/MSFT_PrinterDriver)[Add-PrinterDriver], CimException

FullQualifedErrorID : HRESULT 0X80070490, Add-PrinterDriver


Any ideas how I can fix this?

windows-api-generalwindows-hardwarewindows-server-print
5 |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.

CarlFan-MSFT avatar image
0 Votes"
CarlFan-MSFT answered CarlFan-MSFT commented

Hi,
Please refer to the information in the link below:
https://serverfault.com/questions/968120/unable-to-add-printer-driver-using-add-printerdriver-on-2012-r2-print-server
Hope this helps and please help to accept as Answer if the response is useful.
Best Regards,
Carl

· 2
5 |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.

Hi @CarlFan-MSFT,

Thank you for your reply.

This is not the same issue. I get the issue of the link only when manually delete the inf file and then try to add by
" Add-PrinterDriver "printerDriverName "

But when I install driver by pnputil.exe -i -a "path_to_inf_file.inf". I get different error(Mentoned above). So as I get the issue is not related to wrong inf file path.

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

Hi @HrachMartirosyan-5700,
I'm sorry to see your message when I just came back from vacation.
Thank you for your information.
Because this is more of a driver api development installation failure issue, so I consider that you'd better post the issue to Windows Hardware WDK and Driver Development forum.
According to your description, as far as I understand, under the system level, I think you can take a look at the following aspects.
1.Event log. If it recorded some error after call printer driver name.
2.Check a log file located at %WINDIR%\inf\setupapi.dev.log (normally c:\Windows\inf\setupapi.dev.log).

Look for a line that contains Failed to find driver update or FAILURE(0×00000490).

Note the exact path to the .inf file that failed.

Open up the command prompt again (cmd) as administrator and run

pnputil -a INSERT_FILE_NAME_OF_FAILED_INF
Hope this helps and please help to accept as Answer if the response is useful.
Best Regards,
Carl

0 Votes 0 ·
CarlFan-MSFT avatar image
0 Votes"
CarlFan-MSFT answered

Hi @HrachMartirosyan-5700,
In addition, the Windows Hardware WDK and Driver Development forum is located on the link below:
https://social.msdn.microsoft.com/Forums/windowshardware/en-US/home?forum=wdk
For Q&A forum, I suggest that you could only use the hardware-wdk tag.
Hope this helps and please help to accept as Answer if the response is useful.
Best Regards,
Carl

5 |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.

Hebert-Seven avatar image
0 Votes"
Hebert-Seven answered Hebert-Seven edited

Hi @HrachMartirosyan-5700

To Add Printer in a Print Server I realized the following steps:

  1. Add the printer driver manually or using the Add-PrinterDriver cmdlet

  2. Use de Add-Printer cmdlet

IMPORTANT: To use Add-Printer cmdlet you need before add a PrinterPort. Click on the Add-PinterPort link

If you stil have a doubt, please, reply this e-mail

I have a Excel Worksheet that combine these commands.


5 |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.