Operating System - Microsoft
1822430 Members
3033 Online
109642 Solutions
New Discussion юеВ

net use and system error 1231

 
SOLVED
Go to solution
John Sherman_5
Occasional Advisor

net use and system error 1231

I'm trying to put
"net use lpt1 \\print_server\itprinter /persistent:yes"
into a batch file so when I run a DOS program LPT1 gets mapped to my printer. However, I keep getting:
"System error 1231 has occurred. The network location cannot be reached."
when I do this. When I try it with Start -> Run it works great. Is there some way I can get LPT1 mapped to my printer when the DOS window runs, or automatically whenever I login? I will always need it mapped this way.
15 REPLIES 15
Antoniov.
Honored Contributor

Re: net use and system error 1231

Yes,
Control Panel, Printers, righ click on "itprinter", property, detail tab, connect printer to port, choice lpt1 port, set \\print_server\itprinter and select reconnect at startup.
Because I haven't english version, some term or word may be slightly different.

Antonio Vigliotti
Antonio Maria Vigliotti
John Sherman_5
Occasional Advisor

Re: net use and system error 1231

Antonio,

Thanks for the response, but I can't duplicate your solution. First, I should mention I'm running XP Pro, so that could make a difference. Next, I can't select the printer share name "itprinter", only the printer itself, which is an OfficeJet 6110. When I right click Properties, the only tabs available are General, Sharing, Ports, Advanced, Color Management, and About. I've tried looking in all of them for "Reconnect at Startup" and I don't see that option anywhere. Thanks for any and all help you can provide, since if I can't get this to work reliably I can't keep this printer.
Norman_21
Honored Contributor

Re: net use and system error 1231

Hello

How to Assign a Logon Script to a Profile for a Local User:
http://support.microsoft.com/default.aspx?scid=kb;en-us;315245&Product=winxp

Another way, assuming your PC is a stand alone PC, meaning is not connected to any server:
Start>run>type gpedit.msc>Computer Configuration>Administrative Templates>System>Logon>Set run these programs at computer logon to enabled and add the batch file.

As far as the error 1231, check your event log and post the Event ID over here along with the source name.

Hope this help and please consider assigning points.
"Attitudes are contagious, is yours worth catching"/ My first point was given by SEP on January 31, 2003
John Sherman_5
Occasional Advisor

Re: net use and system error 1231

Thanks for the response. I'm finding that sometimes the net use command works and sometimes it doesn't, but I've never been successful at getting it to work from the command line in DOS or a batch file unless I get it to run from Start -> Run first. I tried checking event logs and couldn't find any record of the event anywhere in the Application, Security, or System logs. Thanks for the tip on gpedit.msc -- this looks really cool.
Norman_21
Honored Contributor

Re: net use and system error 1231

Hello

If it works only from Start>Run then it's probably a PATH issue.

Go to Start>Run>type cmd>then type path and hit Enter key.

Specify the full path in the batch file before the net command.

See if this will work!
"Attitudes are contagious, is yours worth catching"/ My first point was given by SEP on January 31, 2003
Antoniov.
Honored Contributor

Re: net use and system error 1231

Ok,
When you open property you see "General, Sharing, Ports, Advanced, Color Management, and About". Select Ports (as I posted I have no got english version); now you can see a button like "connect", click on it; now you can see a little windows with 3 object: port to select (choice LPT1), remote shared printer (write \\print_server\itprinter) and connect on reboot (select it).

H.T.H.
Antonio Vigliotti


Antonio Maria Vigliotti
John Sherman_5
Occasional Advisor

Re: net use and system error 1231

Thanks for all the help -- I really apprecieate you giving it your best shot and in such a timely manner. You've been great!

It's not a PATH issue, since the NET command is in the path and works fine once I've executed it from Start->Run, and always answers up even when I get the error 1231.

Under the Ports tab I have Add, Delete, and Configre Port buttons. I suspect the button you're talking about is the "Congugure Port..." but when I try pushing it I get an error message.

So... I've decided to put my old printer back online (that has an LPT1 port) and give this one to someone else who doesn't need to run these old DOS programs. I've spent hours on this and don't have any more time top give it. If I buy another printer, I'll make sure it has an LPT1 port on it!

Once again, thanks for all the assistance.
Kristin Bell
New Member
Solution

Re: net use and system error 1231

Hello John..I know this post was put up a long time ago, but I was having the same problem the other day, and finally figured how to get this to work, and I was hoping you still needed some help.

First, have you ever heard of a hardware component already installed in Windows XP called "Microsoft Loopback Adapter"? That is the answer to all your problems.

If you have not already tried this, please email me or post back here, and I will give you step by step instructions on how to install. After you install this, everything should work properly. Please respond if you haven't done this already.

Thanks,
Kristin
John Sherman_5
Occasional Advisor

Re: net use and system error 1231

Hi Kristin,

It's been over 2 years ago, and I finally gave up and had to put the old printer back online and move the new one to another location that didn't need to run DOS windows. However, there's no telling how long the old printer will hold out and I'm still running the DOS programs that require this. I've heard of a loopback cable but never tried it out. If you have instructions on how to resolve this I'd still be interested in knowing. Thanks!
Kristin Bell
New Member

Re: net use and system error 1231

John,

I just about gave up as well, then I finally ran across this and FINALLY got it working..Okay, here are the steps...

1. Go to Control Panel
2. Open Add Hardware
3. Click Next
4. After Scan Finishes, select "Yes, I have already connected the hardware"
5. Click Next
6. Scroll to bottom of list and select "Add a new hardware device", Click Next
7. Select "Install the hardware that I manually select from a list (Advanced), click next
8. Select "Network Adapters", click next
9. Select "Microsoft" for Manufacturer
10. Select "Mircosoft Loopback Adapter" in the Network Adapter List, click next, click next again, and click finish.

Now, the network adapter you just added has is a virtual adapter and can be configured like your regular network card..So...Go back to Network Connections into the Control Panel, and go to the Properties of the new Loopback Adapter. Go into the TCP/IP Settings and configure the adapter with a Static IP Address. I used 192.168.1.1 for the IP and 255.255.255.0 for the Subnet Mask.

Two More Steps....

Share the Printer. I'm sure since you have worked so much with this, that you know exactly how to do this. Just go to the properties of printer you are wanting to use and go the "Sharing" tab and then click on Share Printer, then name the printer something simple so you can remember it when you capture it in DOS.

LAST... Go into DOS, and type the very well remembered command...

NET USE LTP1: \\COMPUTER NAME\PRINTER /PERSISTENT:YES

Hopefully this works for you! This worked the first time I tried it after days of stupid commands that never worked... Please let me know if this helps you..!

Thanks!!
Kristin
kristin.l@verizon.net
John Sherman_5
Occasional Advisor

Re: net use and system error 1231

I gave this a try with another printer I have connected to the network, and it seemed to work great! I'm curious as to why this does the trick though, since I'm just reating another network adapter that doesn't really do anything. Nevertheless, it looks like a solution. I'll definitely put this in my "bag of tricks".

--John
Kristin Bell
New Member

Re: net use and system error 1231

I'm not sure why this works...Seems like Microsoft hides so many things in Windows..I think they may do that just so we will call technical support and have to pay $35.00...lol...I'm glad it worked for you on that one printer...I am definitely hiding this in my bag of tricks too...

Kristin
Jon Finley
Honored Contributor

Re: net use and system error 1231

Sounds like going the long way to create a TCP port during the printer setup.

When you go to add the printer in Windows, Select local, but don't automatically detect the printer, click on "Next", then on the next screen (towards the bottom) create a new port. Select Standard TCP/IP port, then next. Supply the IP address, change the name (if you don't want it to be the address name) and continue through to finish the port setup. Finish the printer setup, then use the net use command to finish the process.

Jon
"Do or do not. There is no try!" - Yoda
mdgray222
New Member

Re: net use and system error 1231

Thanks Kristin.....

 

The loopback adapter solved the issue.  Thanks for posting

 

Michael

felferrari
New Member

Re: net use and system error 1231

Tks Kristin.....

 

Loopback adapter worked!!!

 

Felipe Ferrari