Don't despair, it only requires a few tweaks.
Have an ini file on your netlogon share in the format:
code:
[PrinterMap]
HP1=\\server1\HP1
ColourHP2=\\otherserver\ColourHP2
Now, change the script slightly so that it reads:
$sPrintServer="\\MyPrintServer" $sPrinterMap=@LSERVER+"\netlogon\PrinterMap.ini" $iIndex = 0 $sGroup=EnumGroup($iIndex) While $sGroup ; Not interested in domain. If InStr($sGroup,'\') $sGroup=SubStr($sGroup,InStr($sGroup,'\')+1) EndIf If Instr($sGroup,"Printer: ")=1 $sPrinter=ReadProfileString($sPrinterMap,"PrinterMap",SubStr($sGroup,10)) If $sPrinter If AddPrinterConnection($sPrintServer+"\"+$sPrinter) "ERROR "+@ERROR+": "+@SERROR+@CRLF+"While mapping "+$sPrintServer+"\"+$sPrinter ? Else "Printer "+$sPrintServer+"\"+$sPrinter+" mapped ok." ? EndIf Else "ERROR: Could not find printer mapping for "+$sPrinter ? EndIf EndIf $iIndex=$iIndex+1 $sGroup=EnumGroup($iIndex) Loop
|