Jump to content


  • 0
krdell

Network Printer Not Showing When Installing via Command Line

Question

I am attempting to add a printer via the command line using a batch file as an admin (to eventually deploy via SCCM TS on Win10):


rundll32 printui.dll,PrintUIEntry /in /ga /n"\\my network printer"


The command appears to run successfully but I am not able to find any trace of this printer in my printer list, print management, or in the registry (HKEY_LOCAL_MACHINE → SYSTEM → CurrentControlSet → Control → Print → Printers)


When I attempt to run it a second time I get the error message "Unable to add the per machine printer connection. Another printer or printer share with this name already exists. Please use another name for the printer."


Any ideas? Thanks in advance!


Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

 

I am attempting to add a printer via the command line using a batch file as an admin (to eventually deploy via SCCM TS on Win10):

rundll32 printui.dll,PrintUIEntry /in /ga /n"\\my network printer"

The command appears to run successfully but I am not able to find any trace of this printer in my printer list, print management, or in the registry (HKEY_LOCAL_MACHINE → SYSTEM → CurrentControlSet → Control → Print → Printers)

When I attempt to run it a second time I get the error message "Unable to add the per machine printer connection. Another printer or printer share with this name already exists. Please use another name for the printer."

Any ideas? Thanks in advance!

 

 

Printer are a user setting, not a system setting. TS will run as the local system account, therefore you are adding the printer to the local system account and not the computer itself.

Share this post


Link to post
Share on other sites

  • 0

After more troubleshooting I've narrowed it down to this: using script with 2 different printers on 2 diff print servers, I've discovered that this script works for all domain users on windows 7. It works for all domain users on windows 10 when using one printer but not the other.

 

So, it looks like the issue has to do with one particular queue on Windows 10 only but not sure why...doesn't make much sense. Any ideas?

Share this post


Link to post
Share on other sites

  • 0

After more troubleshooting I've narrowed it down to this: using script with 2 different printers on 2 diff print servers, I've discovered that this script works for all domain users on windows 7. It works for all domain users on windows 10 when using one printer but not the other.

 

So, it looks like the issue has to do with one particular queue on Windows 10 only but not sure why...doesn't make much sense. Any ideas?

 

How exactly are you deploying this? With what settings?

Share this post


Link to post
Share on other sites

  • 0

Right now I am manually applying the script above via batch file for testing purposes. My intention is to deploy it via sccm task sequence as we have done with no problem for years. I am only now having this problem with Windows 10

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.