Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3006
  • Last Modified:

'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?
0
meesha
Asked:
meesha
2 Solutions
 
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
 
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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
kronostmCommented:
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
 
oBdACommented:
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
 
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

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now