printui.dll Printer install driver issues.
I am trying to learn parts of the PrintUI.dll interface and I am encountering some issues. I have found that the PrintUI.dll interface seems to encounter errors with certain driver sets (particularly PLC6 drivers from Xerox and almost anything Lanier from
what I have encountered in my testing). For kicks I have decided to add the drivers to the PnP package (via pnputil.exe). Once the driver was added to the PnP settings, I attempted to manually add the printer the normal way and confirmed that the driver I
needed was installed and working. I deleted that printer and then ran the printer install using the driver location in the System32\DriverStore\FileRepositoryL location as the driver .inf location and I encountered an error stating a suitable print driver.
See below:
Test 1:
Driver package located at C:\drivers\disk1\LANSETUP.inf (I AM able to navigate to this folder and use this exact file for a standard printer install with driver not pre-installed.
Run command to automate printer install:
rundll32 printui.dll,PrintUIEntry /if /b "Printer Name" /f c:\drivers\disk1\LANSETUP.inf /r "Port Name" /m "RICOH Aficio MP C4000 PS"
Receive Error:
Operation could not be completed (error 0x00000705). Windows cannot locate a suitable printer driver. Contact your administrator for help locating and installing a suitable driver.
Test 2:
Add driver found at c:\drivers\disk1\LANSETUP.inf to PnP driver set
pnputil.exe -i -a c:\drivers\disk1\LANSETUP.inf
New folder is created due to the above command at C:\Windows\System32\DriverStore\FileRepository\lansetup.inf_amd64_neutral.698e3dea9eab2441
Attempt manual setup to ensure that driver is now listed in Windows Driver set, PS driver is now appearing as preinstalled driver.
Attempt command:
rundll32 printui.dll,PrintUIEntry /if /b "Printer Name" /f C:\Windows\System32\DriverStore\FileRepository\lansetup.inf_amd64_neutral.698e3dea9eab2441\LANSETUP.inf /r "Port Name" /m "RICOH Aficio MP C4000 PS"
Error Received:
Operation could not be completed (error 0x00000705). Windows cannot locate a suitable printer driver. Contact your administrator for help locating and installing a suitable driver.
Manual install to check driver installation is successful.
The short of it:
Any ideas as to why Windows is providing random errors installing drivers? In some cases downloading a different driver works, but in the case of this Lanier, EVERY driver has the same issue. This seems to be a widespread yet random issue that is entirely
based off of the drivers seeing as some drivers work just fine, just looking for a workaround.
Disclaimer:
This has been done on Windows 7 Enterprise. I am the network admin using a local admin account attempting to install the printer locally. I know there are ways to easily deploy printers with GPO and print servers, but a recent special circumstance has given
me the desire to become more knowledgeable of such features as this.
January 26th, 2012 1:39pm
As a note, I have found a work around that I can use via powershell, but that doesn't really resolve the issue as to why the cmd prompt commands occasionally fail with random drivers. Any information would still be appreciated.
Free Windows Admin Tool Kit Click here and download it now
January 26th, 2012 4:10pm
Hi,
I did some research and find that this error could be occurred when a third party package-aware driver (with a print model in it) has a dependency on a separate core
driver. Currently if the "model" driver is installed before the core driver, then the dependency is not satisfied and the installation fails.
When the model driver is installed, print setup should search for a suitable core driver, and install that. If it cannot locate the core driver, then we should prompt
for media before failing the install.
If it is convenient, can you collect the process monitor log for check?
Process Monitor is an advanced monitoring tool for Windows that shows real-time file system, Registry and process/thread activity.
===================================================================================
a. Please download Process Monitor from:
http://www.microsoft.com/technet/sysinternals/ProcessesAndThreads/processmonitor.mspx
b. Extract the zip package and double-click the Procmon.exe file to start Process Monitor.
c. While Process Monitor is running, please reproduce the issue.
d. After the issue is reproduced, then switch to the Process Monitor window, and then click the microscope icon in the toolbar to stop the capture (CTRL+E).
e. On the File menu, click Save. Then save the Process Monitor log to any folder that you want and upload the log file to me.
Microsoft Workspace
----------------------
Please upload the collected files to me via the Workspace I set up for you:
URL:
https://sftus.one.microsoft.com/choosetransfer.aspx?key=199790bb-20ec-4e0d-aa85-ca661f2fe8d0
Password:
B^pnjCAOJ9CK
Meanwhile, can you also send me the problematic driver package for local test with the detailed steps about how did you encounter the issue?
Does the problematic driver is cross architecture with the OS?
Best regards,
Spencer ShiPlease remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
February 3rd, 2012 4:15am
I am having what appears to be the same issue, although with a different printer model. I receive the 0x00000705 error when running the following command to load a PCL6 driver for a Canon iR3235 printer:
rundll32 printui.dll,PrintUIEntry /if /b "printer" /f "c:\canonimagerunner\P62KUSAL.inf" /r "IP_192.168.152.41" /m "Front Desk"
I resorted to using PrintUI instead of Group Policy printer management because that method was also failing to load this printer, perhaps due to the same core driver dependency issue. We are testing this on a 32-bit Windows 7 Enterprise workstation.
I have gone ahead and captured a Process Monitor log as you suggested to Patrick and uploaded it for you, as well as a ZIP file of the Canon driver. Thanks for any help you can provide!
-Matthew
Free Windows Admin Tool Kit Click here and download it now
February 23rd, 2012 2:37pm
The print driver isn't unsigned is it? You can also install print drivers offline with dism.
February 23rd, 2012 4:30pm
I believe it is a signed driver, downloaded from:
http://www.usa.canon.com/cusa/office/products/hardware/multifunction_printers_copiers/black_white_copiers/imagerunner_3235#DriversAndSoftware
It's the "PCL6_v6.90_Win2k-Win7_INF.exe" package for Win7 x86. I'm not sure DISM would help us in this situation as these workstations are already in production on the network.
Free Windows Admin Tool Kit Click here and download it now
February 24th, 2012 1:30pm
Any further ideas on this issue? We continue to be stumped, having to manually map printers on a user-by-user basis.
-Matthew
April 9th, 2012 12:47pm
You can't just use 'pnputil -a file.inf' to add the driver to the driverstore before installing a new printer?
I actually still use prnadmin.dll and vbscript to install printers, but I have to use the 32 bit wscript.exe. I've never had a problem unless the driver was unsigned.
By the way, you can netboot a computer to winpe, and then if you have the dism folder on the network, you can use it on the offline windows system.
Free Windows Admin Tool Kit Click here and download it now
April 9th, 2012 12:52pm
Thanks for the reply. I finally had a chance to try your pnputil suggestion and got this result:
C:\Windows\system32>pnputil -a c:\pcl6\P62KUSAL.inf
Microsoft PnP Utility
Processing inf : P62KUSAL.INF
Driver package added successfully.
Published name : oem7.inf
Total attempted: 1
Number successfully imported: 1
I then attempted to map the printer again using the following commands which all failed:
rundll32 printui.dll,PrintUIEntry /if /b "printer" /f "c:\pcl6\P62KUSAL.inf" /r "IP_192.168.152.41" /m "Front Desk"
rundll32 printui.dll,PrintUIEntry /if /b "printer" /r "IP_192.168.152.41" /m "Front Desk"
rundll32 printui.dll,PrintUIEntry /if /b "printer" /f "c:\windows\system32\driverstore\oem7.inf" /r "IP_192.168.152.41" /m "Front Desk"
The first two failed with the usual 0x00000705 error, while the last failed with: "Operation could not be completed (error 0x00000002)."
What am I missing here?
April 26th, 2012 7:39pm
If you try to add it through the control panel, does it say the driver is signed?
Free Windows Admin Tool Kit Click here and download it now
April 26th, 2012 8:02pm
Yes, adding the printer manually (and pointing to the same P62KUSAL.inf with the "have disk" option) reports that "this driver is digitally signed", as seen in the attached screenshot.
April 27th, 2012 1:41pm