How to configure a network printer using command prompt under Windows 7?

17,873

To add a network printer through the command line:

rundll32 printui.dll,PrintUIEntry /ga /c\\computername /n\\servername\printersharename

This adds the shared printer on the server for all users of the computer "computername". Note that PrintUIEntry is case-sensitive, which can be a bit of a pitfall.

Refer to http://technet.microsoft.com/en-us/library/ee624057(v=ws.10).aspx for more details.

Share:
17,873

Related videos on Youtube

Ivo Flipse
Author by

Ivo Flipse

I work on Software as a Medical Device at Zimmer Biomet. You can follow me on Twitter: ivoflipse5

Updated on September 17, 2022

Comments

  • Ivo Flipse
    Ivo Flipse over 1 year

    I have a network printer that is properly shared under Windows 7 on network with Windows 7 computers, but when configuring it in command prompt with:

    net use lpt1: \\zzzz\laser /persistent:yes
    

    then it requires a user name and password. How can I configure the printer so that this is no longer required?

    • Ivo Flipse
      Ivo Flipse about 14 years
      @Feroz, next time please take some more time to properly phrase your question. Not everyone is willing to decypher your question, so your less likely to receive an answer. Good luck on your next question!