Score:0

Unable to install printer driver using pnputil

mp flag

I am trying to install multiple printers on a print server, however before that as a pre-requisite I have to add the printer drivers for which I am performing below steps but I am unable to view the correct driver under Get-PrinterDriver commandlet. Please help me.

Step 1 add and Install the driver from source inf file

pnputil /add-driver D:\Drivers\Ricoh\Ricoh MP 402\disk1\oemsetup.inf /install

Step 2 get the list of printer drivers

Get-PrinterDriver -Name *

Step 3 add ports of the printer

Add-PrinterPort -Name <Priner IP address> -PrinterHostAddress <Priner IP address>

Step 4 add Printer

Add-Printer -Name <Printer Name> -DriverName 'Ricoh MP 402SPF' -PortName <Printer IP Address>

However, in step 4 the command fails with below error.

Add-Printer : The specified driver does not exist. Use add-printerdriver to add a new driver, or specify an existing driver. At D:\Install_printer.ps1:41 char:17

  • ... Add-Printer -Name $Printer.PrinterName -DriverName "$Driv ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (MSFT_Printer:ROOT/StandardCimv2/MSFT_Printer) [Add-Printer], CimException
    • FullyQualifiedErrorId : HRESULT 0x80070705,Add-Printer

When I investigated, then I found that under Get-PrinterDriver command I am unable to see the correct driver name 'Ricoh MP 402SPF' and when I checked C:\Windows\INF\setupapi.dev.log file, I was able to see the driver was installed successfully.

Out put of Get-PrinterDriver commandlet

  • PCL6 V4 Driver for Universal Print

    Microsoft XPS Document Writer v4

    Microsoft Print To PDF

    Microsoft enhanced Point and Print driver

    HP LaserJet 9040 PCL6 Class Driver

    RICOH SP 4510DN PCL 6

    Ricoh MP C1500/615C PCL6

    Remote Desktop Easy Print

    Microsoft enhanced Point and Print compatibility driver

    Generic / Text Only

    Microsoft enhanced Point and Print compatibility driver

Can someone help me what exactly I am missing and where/how I can install the driver? Also can someone guid if add-printerdriver is still required? If Yes, please guide me how can I check what's the name of the driver?

PS: I have created a whole script using the above command lets, so even using solo commandlets also I am failing to install the printers.

Score:0
cn flag

I have confirmed the pnputil command is failing. This is a defect in the printer driver. You would need to contact the vendor. As a workaround, installing the driver using the traditional Print Server Properties dialog works, as specified in the ReadMe.html.

Ishan Sharma avatar
mp flag
But pnputil command is successful on the machine. As confirmed from setup.dev logs.
Ishan Sharma avatar
mp flag
Below is the output of the pnputil command Microsoft PnP Utility Adding driver package: oemsetup.inf Driver package added successfully. Published Name: oem17.inf Driver package installed. Total driver packages: 1
cn flag
@IshanSharma: obviously it is not successful as the driver does not exist. That is the test. Additionally, the vendor needs to support this installation method. If they don't it isn't going to work. Usually it means it did not create some registry settings or copy file(s). You can check that by performing the installation on two different clean test machines and compare the files/registry values.
Ishan Sharma avatar
mp flag
I have tried adding the driver manually via Print Server properties and thereafter it showed up in get-printerdriver commandlet, may be you're correct pnputil method was not registering the drivers. Is there any way if there are multiple drivers how we can install them in Windows Driver Store or get it registered?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.