adding printers using logon scripts
Has anyone out there got an example of a logon script to map a shared printer?Printer shared on my DCWindows server 2003 = C4R-DC1Printer Share = 1522Windows XP client. Mapped ok for network drive but am stumped about adding printers using a logon script.Any help would be great,Thanks,Kevin
January 12th, 2010 2:17pm
Hi Kevin, Do you need a VBS script or a commnad line will do? Here is an example of the command: prtadd \\server_name\shared_printer_name Here you can find a VBS script: http://www.computerperformance.co.uk/ezine/ezine16.htm
Free Windows Admin Tool Kit Click here and download it now
January 12th, 2010 2:33pm
I would like to add it to my batch file I have for mapping the drives. Just tried the example and it didn't work. I need it to install the printer and set it as my default printer,Thanks,
January 12th, 2010 2:48pm
Hi, Have a look at this: http://support.microsoft.com/kb/314486
Free Windows Admin Tool Kit Click here and download it now
January 12th, 2010 4:36pm
I found it. Just in case anyone needs it. Regards,KevinThis is a basic one;
REM Add printerecho Installing [printer name] on [servername]!RunDll32.EXE printui.dll,PrintUIEntry /in /n \\server\printerecho Your default printer is [printername] on [server]REM Set Default Printer RunDll32.EXE printui.dll,PrintUIEntry /y /n \\server\printer
Here is a more complex one;
@ECHO OFF
REM **Example Printers.bat file **REM ** Set a variable called 'Location' on each pc
REM ** This line removes any printers from the profileREM \\RANGER1\NETLOGON\CON2PRT /F
REM ** These lines match the variable to a print shareREM IF %Location% == Room23 \\RANGER1\NETLOGON\CON2PRT /CD \\RANGER1\hpLASER
January 13th, 2010 1:02pm


