Can you distribute printers to clients?

  • Thread starter Thread starter Alex Anderson
  • Start date Start date
A

Alex Anderson

Hello,

Is it possible to dish out printers using GPO's or login script?

Thank you
Alex Anderson
 
Alex, yes it is possible.

There are several ways. I personally like to use a .vbs logon script via
GPO.

Two examples might be as follows ( including mapped network drives ):

===============================================

Dim net
Set net = CreateObject("WScript,Network")
net.RemoveNetworkDrive "I:"
net.MapNetworkDrive "I:", "\\server\share01","False"
net.RemoveNetworkDrive "J:"
net.MapNetworkDrive "J:", "\\server\share02", "False"
net.AddWindowsPrinterConnection "\\printserver\printer01"
net.AddWindowsPrinterConnection "\\printserver\printer02"
net.SetDefaultPrinter "\\printserver\printer01"

================================================

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

================================================

Dim WshNetwork
Set WshNetwork=WScript.CreateObject("WScript.Network")
WshNetwork.RemoveNetworkDrive "I:"
WshNetwork.MapNetworkDrive "I:","\\server\share01"
WshNetwork.RemoveNetworkDrive "J:"
WshNetwork.MapNetworkDrive "J:","\\server\share02"
PrinterPath = "\\printserver\printer01"
WshNetwork.AddWindowsPrinterConnection PrinterPath
PrinterPath = "\\printserver\printer02"
WshNetwork.AddWindowsPrinterConnection PrinterPath

================================================

Both will work. I prefer the first one....

Please remember that GPOs apply to WIN2000 Pro and WINXP Pro clients and not
to WIN9x / WINNT clients.

HTH,

Cary
 
Hi Cray, Everything's well?
How ever I want to ensure Alex know if the VBS scripts are used within the
login script defined in Profiles tab to a particular users account. It will
applies and work for win9x and winnt4.0 as well if the IE with Visual Basic
Scripting Support are installed. Correct me if I'm wrong I have only done
this in the practices to NT4.0 also.

--
Regards
Christoffer Andersson

No email replies please - reply in the newsgroup
 
Thank you Chris and Cary.

Alex Anderson

Chriss3 said:
Hi Cray, Everything's well?
How ever I want to ensure Alex know if the VBS scripts are used within the
login script defined in Profiles tab to a particular users account. It will
applies and work for win9x and winnt4.0 as well if the IE with Visual Basic
Scripting Support are installed. Correct me if I'm wrong I have only done
this in the practices to NT4.0 also.

--
Regards
Christoffer Andersson

No email replies please - reply in the newsgroup
 
Howdy, Chris!

Everything is well. Thank you!

Not sure. I have only run the .vbs scripts in the context of a GPO logon
script. I would have to check it and see. That I can do but it will
probably not be today as I am working on a project...

Remind me if I do not respond over the weekend, okay.

Cary
 
Cray, if you have the time you can send me an e-mail to
(e-mail address removed)

Take care.

--
Regards
Christoffer Andersson

No email replies please - reply in the newsgroup
 
Please see.

Administrative Templates\Windows Components\Windows Explorer\
Hide these specified drives in My Computer


Thanks for asking.

--
Regards
Christoffer Andersson

No email replies please - reply in the newsgroup
 
Wrong NG, Sorry

--
Regards
Christoffer Andersson

No email replies please - reply in the newsgroup

Chriss3 said:
Please see.

Administrative Templates\Windows Components\Windows Explorer\
Hide these specified drives in My Computer


Thanks for asking.

--
Regards
Christoffer Andersson

No email replies please - reply in the newsgroup

Cary Shultz said:
Howdy, Chris!

Everything is well. Thank you!

Not sure. I have only run the .vbs scripts in the context of a GPO logon
script. I would have to check it and see. That I can do but it will
probably not be today as I am working on a project...

Remind me if I do not respond over the weekend, okay.

Cary

Chriss3 said:
Hi Cray, Everything's well?
How ever I want to ensure Alex know if the VBS scripts are used within the
login script defined in Profiles tab to a particular users account. It will
applies and work for win9x and winnt4.0 as well if the IE with Visual Basic
Scripting Support are installed. Correct me if I'm wrong I have only done
this in the practices to NT4.0 also.

--
Regards
Christoffer Andersson

No email replies please - reply in the newsgroup

"Cary Shultz [A.D. MVP]" <[email protected]> skrev i meddelandet
Alex, yes it is possible.

There are several ways. I personally like to use a .vbs logon
script
via
GPO.

Two examples might be as follows ( including mapped network drives ):

===============================================

Dim net
Set net = CreateObject("WScript,Network")
net.RemoveNetworkDrive "I:"
net.MapNetworkDrive "I:", "\\server\share01","False"
net.RemoveNetworkDrive "J:"
net.MapNetworkDrive "J:", "\\server\share02", "False"
net.AddWindowsPrinterConnection "\\printserver\printer01"
net.AddWindowsPrinterConnection "\\printserver\printer02"
net.SetDefaultPrinter "\\printserver\printer01"

================================================

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

================================================

Dim WshNetwork
Set WshNetwork=WScript.CreateObject("WScript.Network")
WshNetwork.RemoveNetworkDrive "I:"
WshNetwork.MapNetworkDrive "I:","\\server\share01"
WshNetwork.RemoveNetworkDrive "J:"
WshNetwork.MapNetworkDrive "J:","\\server\share02"
PrinterPath = "\\printserver\printer01"
WshNetwork.AddWindowsPrinterConnection PrinterPath
PrinterPath = "\\printserver\printer02"
WshNetwork.AddWindowsPrinterConnection PrinterPath

================================================

Both will work. I prefer the first one....

Please remember that GPOs apply to WIN2000 Pro and WINXP Pro clients and
not
to WIN9x / WINNT clients.

HTH,

Cary




Hello,

Is it possible to dish out printers using GPO's or login script?

Thank you
Alex Anderson
 
Back
Top