logon script to add network printers

G

Guest

hey guys,

this is a logon script i have implemented in one of our windows 2000 server
networks with all workstations windows 2000 professional with SP4. the script
has worked well with us, now we need to add few printers shared on the
network. can someone help me out here on how do i go about from here?


@echo off
REM filename: logon.cmd
echo Hello %username%
echo You are now logged into %computername%
echo Now setting up your computer for network access.
echo Connecting Network Drive
net use t: /DELETE
net use t: \\san01\bull /PERSISTENT:YES
echo Done.
echo Connecting Another Network Drive
net use r: /DELETE
net use r: \\san01\cow /PERSISTENT:YES
echo Done.

Thanks in advance
 
P

Pegasus \(MVP\)

Your batch file is somewhat contradictory. On the one
hand you set /persistent:yes but on the other hand you
keep deleting remembered connections. If you make
your share connection in the logon script then you do
NOT want Windows to remember old connections!

The two lines preceded by # need to be executed just
once on each PC although it won't hurt leaving them
there. Remove the leading hashes!

I copied the vbs script from another post and I haven't
tried it myself.

@echo off
echo Hello %username%
echo You are now logged into %computername%
echo Now setting up your computer for network access.
echo Connecting Network Drive
#net use /persistent:no
#net use * /del /yes
net use t: \\san01\bull
echo Done.
echo Connecting Another Network Drive
net use r: \\san01\cow
echo Done.
net use
c:\Tools\Printer.vbs


Printer.vbs
=======
on error resume next
Set WshNetwork = CreateObject("WScript.Network")
WshNetwork.AddWindowsPrinterConnection "\\printserver\printershare1"
WshNetwork.SetDefaultPrinter "\\printserver\printershare1"
Set WshNetwork = nothing
 

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

Similar Threads

Batch File Logon Script 1
Logon Script 4
Drive mapping lost 4
net use 2
How to unmap "ghost" network drive 4
Help about a script .bat 0
script 1
accessing network drive at startup 7

Top