Net Use LPT1 : The Network Location Cannot Be Reached

Posted on 2005-04-19
Medium Priority
Last Modified: 2008-01-09
I am trying to capture LPT1 for use with a generic printer driver that runs on a port that creates a text file.

Here are the steps I use:

- Add a Generic Text Printer

- Create a new Local Port for the printer and name it C:\temp\PrintThis.txt (as an example)

- Share the Printer with the share name GenericT

Then I use Net Use to capture LPT1 to the shared generic printer like this:

       Net Use LPT1 \\machinename\GenericT /persistent:yes

This works fine as long as the machine is connected to ANY sort of network connection. I can connect a cable to a DSL modem and it will work but if the cable is disconnected I get the following error:

       System Error 1231 has occurred

       The network location cannot be reached. For information on network trouble shooting see Windows Help.

Any thoughts?
Question by:tdantona
  • 3
LVL 24

Accepted Solution

Kenneniah earned 1000 total points
ID: 13819770
Go to Regedit and browse to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters

Hit Edit|New>DWORD Value, name it "DisableDHCPMediaSense" and set the value to 1

This will stop Windows from detecting the cable being unplugged and therefore unbinding File and Print Sharing etc.
LVL 24

Expert Comment

ID: 13819772
After doing that, reboot and your problem should go away.

Author Comment

ID: 13824413
You Sir, are my hero, Thanks!!  :-)
LVL 24

Expert Comment

ID: 13826830
Most welcome, glad it worked out for you!

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you unable to synchronize your OST (Offline Storage Table) file with Microsoft Exchange Server? Is your OST file exceeding 2 GB size limit? In Microsoft Outlook 2002 and earlier versions, there is a 2 GB size limit for the OST file. If the file …
We have adopted the strategy to use Computers in Student Labs as the bulletin boards. The same target can be achieved by using a Login Notice feature in Group policy but it’s not as attractive as graphical wallpapers with message which grabs the att…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month14 days, 2 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question