Jump to content
The mkiv Supra Owners Club

IT Question. Adding Printers/logon script


scooby_doo_do

Recommended Posts

At the moment we have our printers on a print gateway and we add then to the user's machines manually. I was just wondering if there is a way somehow to automatically have them so that they are added when the user log's on, to the correct printer? I thought about writing a net use script and adding it to the logon.bat, but i'm sure there must be an easier way within active directory - so i can just add a printer to a user?

 

Any advice greatly appreiciated..

 

Thanks

 

Craig.

Link to comment
Share on other sites

right obviously the .bat and .vbs both have to be in the scripts folder.

 

My login.bat looks like this:

 

@ECHO OFF

cls

printer.VBS

NET TIME \\BEDC02 /SET /YES

 

BEDC02 is my server name. You can add more into it like mapped drives and stuff. and that bit of script assumes you name the .vbs "printer.vbs"

 

Then the vbs file that just adds a printer to the pc looks like this:

 

' VBScript - to map a network printer

' Version 1.2 - 10th May 2005

' -----------------------------------------------------------------'

Option Explicit

Dim objNetwork, strUNCPrinter

strUNCPrinter = "\\BEDC02\Pi520(153)"

Set objNetwork = CreateObject("WScript.Network")

objNetwork.AddWindowsPrinterConnection strUNCPrinter

 

 

 

WScript.Quit

 

' End of script.

 

and if you want that printer to be default I use this:

 

' VBScript - to map a network printer and set as default

' Version 1.3 - 30th Sept 2005

' -----------------------------------------------------------------'

Option Explicit

Dim objNetwork, strUNCPrinter

strUNCPrinter = "\\BEDC02\PI520(153)"

Set objNetwork = CreateObject("WScript.Network")

objNetwork.AddWindowsPrinterConnection strUNCPrinter

 

' Here is where we set the default printer to strUNCPrinter

objNetwork.SetDefaultPrinter strUNCPrinter

WScript.Echo "Your Default Printer is now: " & strUNCPrinter

 

WScript.Quit

 

' End of script.

 

You would just need to change the "\\BEDC02\PI520(153)" part to point at the server share name of your printer.

Link to comment
Share on other sites

KiXtart's good for this, adding printers (UNC paths) based on group membership.

 

I quite like the idea of publishing all the printers via IIS, and letting users pick which they prefer (assuming you complete all the 'location' boxes correctly) - KB323428 covers this quite nicely.

Link to comment
Share on other sites

as long as your domain is 2003 operational level you can do it all with policies. even if you are only on 2000 level you can publish them to active directory and users can just search for them and add them. As long as they have a roaming profile or stay on the same machine they will only need to do it once.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. You might also be interested in our Guidelines, Privacy Policy and Terms of Use.