Quantcast
Channel: Print/Fax forum
Viewing all articles
Browse latest Browse all 1589

Delete Printer Connections using PrintUI gives error Unable to delete the per machine printer connection. Operation could not be completed (error 0x0000071a)

$
0
0

I'm attempting to use the PrintUI DLL (printui.exe) to add and delete per-machine printer connections shared by a domain member print server to/from domain client computers. But I randomly (25% of the time) get the error "Unable to delete the per machine printer connection. Operation could not be completed (error 0x0000071a)."  Code 0x0000071a may mean "The remote procedure call was cancelled" (RPC_S_CALL_CANCELLED). However it means nothing to me and I do not understand why the RPC would fail on some attempts, but work on subsequent attempts.

  • Print server is Windows 2008 R2 SP1 with the latest recommended hotfixes.
  • Clients are Windows XP SP3 or Windows 7 SP2 with the latest recommended hotfixes.

Seemingly very inexplicably and randomly our support stafff get these errors when they run the script to add or remove printers. It does not matter which printer server or printer share (I have multiple print servers and printers).

I am adding and deleting the connections in a command script using these commands:

   Add:  RUNDLL32 PRINTUI.DLL PrintUIEntry /ga /c\\%1 /n%2 /Gw >> %3

   Delete:  RUNDLL32 PRINTUI.DLL PrintUIEntry /gd /c\\%1 /n%2 /Gw >> %3

I have tried adding print spooler restarts before or after the PRINTUI commands, but this does not seem to help. In fact, if I add the spooler restart it seems like I increase the failure rate on Windows 7 clients and decrease the failure rate on Windows XP clients.

I have even tried to circumvent the problem by deliberately attempting to add or delete an invalidly named printer share ("\\DoesNotExist\IgnoreError") but this throws a pop-up error message which must be clicked "OK" to bypass. That error message is "Unable to add the per machine printer connection. The local print spooler service is not running. Please restart the spooler or restart the machine." Which is an incorrect error and has nothing to do with an incorrectly named print server share in the add or delete commands of PRINTUI.


Viewing all articles
Browse latest Browse all 1589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>