Setting Default Printers in Login Script?

Solution 1:

Why use a script at all?

I roll out printer configurations (and mapped drives) using the client extensions of the group policy mechanism (that was introduced some long time ago and is part of all windows updates since years).

Solution 2:

I use an old exe that came in the WinNT resource kit called con2prt.exe.

The best way to call it would be from your VBS login script as follows:

'Mapping printers needed by everyone
Set WSHShell = CreateObject("Wscript.Shell")
WSHShell.Run ("\\SERVER\SYSVOL\SERVER.local\scripts\map_printers.bat")

And the Map_Printers.bat should contain

:: Map Printers
: HP 1600
\\SERVER\SYSVOL\server.local\scripts\con2prt.exe /cd \\SERVER\HP1600
:: Ricoh Aficio 2035e 
\\SERVER\SYSVOL\server.local\scripts\con2prt.exe /c \\SERVER\RICOH2035
:: Samsung ML-2010
\\SERVER\SYSVOL\server.local\scripts\con2prt.exe /c \\SERVER\SamsML2010
:: HP BusinessInket 2230
\\SERVER\SYSVOL\server.local\scripts\con2prt.exe /c \\SERVER\HP2230

The /cd means set deafult.

You can find out all the commands by running con2prt.exe /?

Also - you can download here : http://www.paulmcgrath.net/download.php?view.2