Scripts are great tools to use for automating tasks expecisally user logins. I have been using a third party program do map drives, install printers, and many other functions for my users. But I still find that this program causes the computer as a whole to run slower and with other items going on in the background I also find it very hard to troubleshoot when this third party program is running slow. I am going to start switching a lot of my users over to scripts that I have written myself to test and see if we can get some computers running a little faster.
Printers are a common problem when it comes to writing scripts for them. Most of use know the NET USE command to map a printer but did you notice that it does not display in Printers and Faxes after you have used the NET USE command. It has been mapped and you can print to LPTx and have it print out but the printer is not listed for Windows use.
Microsoft developed a program called RunDll32.exe that you can use to install these printers. The actual syntax for this command is:
RunDll32.EXE printui.dll,PrintUIEntry /in /n \\server\printer
Where RunDll32.exe is the program but it is using printui.dll to install the printer. To set a printer as the default printer for a user:
RunDll32.EXE printui.dll,PrintUIEntry /y /n \\server\printer
It really is that simple when create a batch file as a script for users to add a printer for them.

