Say: you want to install all the network printers on a Windows server to a workstation. One very easy way to do this is to use KiXtart. This is a very powerful scripting tool which you can run on Windows.
Install kix32.exe in the netlogon folder and run kix32.exe printers.kix from your login script.
You need to change the following script to the printers you want to use and save the script as printers.kix into the netlogon folder:
$printers = "\\SERVER01\Printer 1","\\SERVER01\Printer 2","\\SERVER01\Printer 3"
$X = KeyExist("HKEY_CURRENT_USER\Software\Terminator")
If not $X
$X = AddKey("HKEY_CURRENT_USER\Software\Terminator")
$Y = ReadValue("HKEY_CURRENT_USER\Software\Terminator", "1")
If not @ERROR = 0
while $loop > 1
$loop=$loop - 1
$Y = WriteValue("HKEY_CURRENT_USER\Software\Terminator", "1", "1", "REG_SZ")
If @ERROR = 0
For Each $Element In $printers
if AddPrinterConnection ("$Element") = 0
? $Element " was installed!"
? "Networkprinter removed..."
This script will remove all old networkprinters an install \\SERVER01\Printer 1, \\SERVER01\Printer 2 and \\SERVER01\Printer 3. It will also change a value in the registry so this script will not change anything until you want it to. This way, if a user has selected a default printer it will not be changed on every logon.
Also you could expand the script to install specific printers for specific users, workstations or even IP adress ranges.
Post a Comment