Discussion Locked

adding printers via login script

0 helpful
12 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Does anyone have an example of a login script to add a network printer to a users computer. Net use really does not work.

12 replies

by ewgny

Set WshNetwork = CreateObject("WScript.Network")
WshNetwork.AddWindowsPrinterConnection "\\server\AdminLaser
WshNetwork.SetDefaultPrinter "\\server\AdminLaser"

by ewgny

This script will add printers and set your default
Add line 2 for each printer needed
save as a .vbs

by ewgny

I am currently trying to do the same (by group memberships) look at the newsgroup
microsoft.public.windows.server.scripting
There are a few recent discussions on mapping drives and adding printers according to group membership.

by ewgny

logon script 3 from the above site will map drives and add printers according to group membership

by jeff anderson

That works good. Could you expand on it a little and show me how to use group membership in a if then statement to map different printers to different groups.

I am fairly familiar with if then statement but not sure of the command to find the group. I am also thinking of using case instead for a cleaner script.

by hpoppe

I'm running Win2k and this script works fine here. What I do is to save thjis script as a .bat file in the startup folder og "all users" in Documents and settings.
Script:
rundll32 printui.dll, PrintUIEntry /ga /in /n \\Net_BIOS_name_of_print_server\Net_BIOS_Share_name

The last two parameters must be changed to the NetBIOS name of your printserver and the NetBIOS name of the shared printer.

This discussion is closed to new replies.