Thanks for that. I made a couple of changes to get this to work but basically you've helped a great deal. For info the working script is as follows:


Code:
If NOT @LOGONMODE
	Break On
Else
	Break Off
EndIf
Dim $SO
$SO=SetOption("Explicit", "ON")
$SO=SetOption("NoMacrosInStrings", "ON")
$SO=SetOption("NoVarsInStrings", "ON")
$SO=SetOption("WrapAtEOL", "ON")

Dim $OldServer, $NewServer, $ArrPtrs, $Ptr, $PtrMapState, $NUL
$OldServer = "OldServer"
$NewServer = "NewServer"
$ArrPtrs = Split("Printer1,Printer2,Printer3",",")
For Each $Ptr In $ArrPtrs

	$PtrMapState = PriMapState("\\" + $OldServer + "\" + $Ptr)
	If 0 < $PtrMapState			
			$NUL = AddPrinterConnection("\\" + $NewServer + "\" + $Ptr)
		If NOT @ERROR AND 2 = $PtrMapState
			$NUL = SetDefaultPrinter("\\" + $NewServer + "\" + $Ptr)
			If @ERROR
				? "Error setting default Printer Connection " + $Ptr
				? "Error " + @ERROR + ": " + @SERROR
			EndIf
		Else
			IF @ERROR
				? "Error adding Printer Connection " + $Ptr
				? "Error " + @ERROR + ": " + @SERROR
			EndIf	
		EndIf
		If NOT @ERROR
		
			$NUL = DelPrinterConnection("\\" + $OldServer + "\" + $Ptr)
			If @ERROR
				? "Error deleting Printer Connection " + $Ptr
				? "Error " + @ERROR + ": " + @SERROR
			EndIf
		EndIf
	EndIf

Next

If AddPrinterConnection generates an error, or if AddprinterConnection succeeds but SetDefaultPrinter generates an error, DelPrinterConnection should not be executed.[/quote]