-------------------------------


Function fnRemapPrinter("server1","server4")
Dim $i,$nul,$sPorts,$sDefault,$sPrinters[25]
If @INWIN=1
$sPorts="HKCU\Printers\Connections\"
$sDefault=Split(ReadValue("HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows","Device"),",")[0]
Do
$sPrinters[$i]=EnumKey($sPorts,$i)
$i=$i+1
If Ubound($sPrinters)=$i Redim Preserve $sPrinters[Ubound($sPrinters)+25] EndIf
Until @ERROR
Redim Preserve $sPrinters[$i-1]
For $i = 0 to Ubound($sPrinters)
$share=Split($sPrinters[$i],",")
$share=$share[ubound($share)]
$nul = DelPrinterConnection("\\server1\"+$share)
$nul = AddPrinterConnection("\\server4\"+$share)
If $sDefault = $sOldPath
$nul = SetDefaultPrinter($sNewPath)
EndIf
EndIf
Next
EndIf
Exit @ERROR
EndFunction

-------------------------------------

what i make false????....it doesn't work