Batch processing solves the problem of LAN printer sharing

Source: Internet
Author: User

The company that shares the printer is basically a desktop computer with a relatively good configuration. Install the XP system. Fixed IP address, configure the appropriate permissions and install the printer driver, here specifically, all computers do not open the Guest account, any shared access is required password, so the batch processing is such Share_print.bat (figure):

1, the net use command is connected to the printer service host that needs to be connected, and here is a username and password.

2, invoke the Rundll32 command to invoke the dynamic Connection library on a command-line basis, which is excerpted from the results of the network search, and if you want to know the specific other parameters and usage, enter Rundll32 printui.dll,PrintUIEntry in the Run command/? View other relevant parameters, note /n followed by the shared printer's IP address and printer name

3, the last line of command is to set this shared printer as the default printer.

4, the above command saved as batch execution, to manually click to confirm the installation of the driver, here a lot of information is not well resolved. I hope that the solution must be sent out to learn. (as pictured):

5, after the point is, add the printer is finished, the command window also closed itself. You can see that the printer is connected successfully and is set to default.

6, the problem is, restart the computer will find that can not connect, because the system did not save the password. There will be another batch to solve the problem.

7, add a batch, again through net use to connect the shared printer computer copy to the boot up, so that after the boot can be directly printed without problems. But how do I copy it to the boot? And the user just started running the batch once, and then just a boot, you can print? We are like this:

Set up Copy.bat, which is the Copy connection printer and set as the default batch program to the boot startup project, then call this command to let it connect once, so that the user can print directly, and he restarted the computer, that is, waiting for the program to automatically perform a connection to the printer, click once OK, the other do not have to do anything.

8, after testing, because the connection to the shared printer requires network support, but many computers start very slowly, and the network is long to connect well, so after the improved Share_print.bat is this:

9, the text is to prompt the user to wait, but the background is really the ping, added 15 times parameter meaning is about to wait 15 seconds and so the network normal after the connection to the printer.

10, send two batches to the colleagues who need to connect to the printer, and let them perform the copy.bat.

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.