Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This I understand:

net use P: \\SOME_COMPUTER\SOME_SHARE
net use P: \\1.2.3.4\SOME_SHARE

(the second argument is a logical share on the given computer)

This, I do NOT understand:

net use LPT2: IP_1.2.3.4

(where IP_1.2.3.4 is the name of a "port" assigned to a printer; the IP is a valid and responding device, but the full string "IP_1.2.3.4" is not)

Can anyone tell me, is there ever a syntax of NET USE that could operate on a printer port like that? I can't get it to work, can't find anything via Google, and am practically in tears.

[Sorry if this is cheating, this is basically a re-post of http://stackoverflow.com/questions/1884235/old-school-windows-2000-printing-or-when-is-a-port-name-a-computer but with the scope narrowed just to the main issue at hand.

share|improve this question

migrated from stackoverflow.com Dec 15 '09 at 2:46

This question came from our site for professional and enthusiast programmers.

1 Answer 1

Okay, basically, the command Net Use LPT1: \servername\sharename [persistent:yes/no] is what you are looking for. What it does it to point any incoming traffic to the LPT port and redirects it to the share. Assuming either that the computer hosting the printer or the printer itself is sharing itself, you need to determine the servername of the host and you are assuming the IP_1.2.3.4 is the sharename. Try and Net View the IP address.

You can demonstrate this by going to one of your printers in your computer and right clicking and sharing it. Choose something like SHARED_PRINTER. Then go Net View, look for your own computer's name. Then do Net View on your IP or computer name and it should show the share. Then you can do the Net Use command on your self.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.