'Net Use' in Windows 98 Autoexec.bat

I am trying to map a network printer to LPT3 on a Windows 98 workstation.  I placed the following in the autoexec.bat file:

net use lpt3: /d
net use lpt3: \\server01\ml-1200

When Windows starts, I get an error that the network service has not started and to install NetBUI or IPX/SPX.  This is a peer-to-peer Windows XP network with TCP/IP and Client for Microsoft Networks installed.

Do I have to have an entry in my autoexec.bat file with 'net start' first?  How do I map this printer before Windows loads?
meeshaAsked:
Who is Participating?
 
oBdAConnect With a Mentor Commented:
Save those two lines as "logon.bat" (or whatever.bat) someplace, then create a shortcut to it in the "Startup" folder in the start menu.
0
 
SouljaCommented:
What is the reason you need it to load before windows starts?
0
 
SouljaCommented:
I don't think you will be able to since the autoexec runs before network services starts. If you are trying to print to MS-DOS base applications you can always select the option "Do you print from MS-DOS-based programs?" when setting the printer up in windows.
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
meeshaAuthor Commented:
It does not matter that it loads before Windows starts, only that it loads at some time when the user turns the computer on.

The program is a DOS based application that uses LPT3.

Could I run a batch file from 'run=' in WIN.INI ?
0
 
Adrian DobrotaConnect With a Mentor Networking EngineerCommented:
Yes, you can, and that's your bet here cause the net use command needs the netwk service started as Soulja said, and that does happenAFTER autoexec loads.
Another option would be to use the /persistent option that net use has, so the mapping wopn't lose.
from printer proprieties / port config you have a "capture port" option. Try using that if you want.
There are lots of solutions in win98, but autoexewc is not one of them.

Good Luck

Kronos
0
 
stevenlewisCommented:
If you are comfortable working in the registry,make the bat file, and call it from the run key, it will run when windows loads
0
 
meeshaAuthor Commented:
Thanks for the help.  kronostm had the answer I wanted, but Kronos gave me the idea how I want to do this.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.