Information Technology Reference
In-Depth Information
See Also
Microsoft TechNet: “How Network Printing Works” ( http://technet2.microsoft.com/
WindowsServer/f/?en/Library/d58ce7b9-49cf-4f5e-95e9-1ade005c13e01033.mspx ). This
article provides descriptions and explanations of terminology, architecture, protocols, and
port assignments related to network printing.
8-5. Sharing and Publishing a Printer
Problem
You want to share a printer so that it is accessible over the network and publish it in Active
Directory.
Solution
Using a Graphical User Interface
1.
Open the Printers and Faxes administrative window.
2.
Right-click the printer that you want to share and select Properties.
3.
Select the Sharing tab.
4.
Select the option to Share This Printer and provide a share name.
5.
Select the option to List in Directory if you want to publish this printer in Active Directory.
6.
Click Apply or OK to save your settings.
Using a Command-Line Interface
You can share and publish a printer from the command line using the following commands:
> rundll32 printui.dll,PrintUIEntry /Xs /n <PrinterName> Sharename <ShareName>
> rundll32 printui.dll,PrintUIEntry /Xs /n <PrinterName> Attributes shared
> rundll32 printui.dll,PrintUIEntry /Xs /n <PrinterName> Attributes published
The following are the parameters in the preceding command:
/Xs : Instructs the utility to set printer settings.
/n : Provides the printer name, which immediately follows the parameter and should be
formatted in UNC notation.
For example, to share and publish a printer named HP LaserJet 1300 with the share name
of HRPrinter, execute the following:
> rundll32 printui.dll,PrintUIEntry /Xs /n "HP LaserJet 1300" Sharename "HRPrinter"
> rundll32 printui.dll,PrintUIEntry /Xs /n "HP LaserJet 1300" Attributes shared
> rundll32 printui.dll,PrintUIEntry /Xs /n "HP LaserJet 1300" Attributes published
Search WWH ::




Custom Search