Mapping printers with batch files on startup

M

Mr Happy

We have sites that have no server and share printers using DOS programs
in Windows XP Pro. (All patches applied.) We have always approached
this by creating a (bat) file mapping the printers and putting the
(bat) file in the startup folder.

net use LPT1 \\Computername\Sharename /persistent: no
net use LPT2 \\Computername\Sharename /persistent: no

We resorted to this when on a couple of occasions the printer would
loose its mapping. Sometimes the users would not turn on the computer
with the share for one reason or another and the mapping would get
lost.

Anyway, I am posting because all of a sudden several sites will no
longer map printers with batch files on boot up. This has only
recently started.

After the machine has booted the mappings will not be there, but if you
launch the same file manually, it will work perfectly.

I have tried to save the file as a .com file and I have tried to place
it in the registry's RUN key. I get the same results every time. It
will not run on boot up but will run if you launch it after reboot.


I am under the impression that possibly Microsoft has made a change to
fight virus' or ad-ware, and might have accidentally stepped on this,
but do not know for sure.

Any ideas?
 
P

Pegasus \(MVP\)

Mr Happy said:
We have sites that have no server and share printers using DOS programs
in Windows XP Pro. (All patches applied.) We have always approached
this by creating a (bat) file mapping the printers and putting the
(bat) file in the startup folder.

net use LPT1 \\Computername\Sharename /persistent: no
net use LPT2 \\Computername\Sharename /persistent: no

We resorted to this when on a couple of occasions the printer would
loose its mapping. Sometimes the users would not turn on the computer
with the share for one reason or another and the mapping would get
lost.

Anyway, I am posting because all of a sudden several sites will no
longer map printers with batch files on boot up. This has only
recently started.

After the machine has booted the mappings will not be there, but if you
launch the same file manually, it will work perfectly.

I have tried to save the file as a .com file and I have tried to place
it in the registry's RUN key. I get the same results every time. It
will not run on boot up but will run if you launch it after reboot.


I am under the impression that possibly Microsoft has made a change to
fight virus' or ad-ware, and might have accidentally stepped on this,
but do not know for sure.

Any ideas?

Your first job should be to watch what's going on. Modify your
batch file like so:

net use LPT1 \\Computername\Sharename /persistent: no
net use LPT2 \\Computername\Sharename /persistent: no
net use
pause

What do you see?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top