The problem is that you are increasing the index. However, once you've removed a printer, the other printers indices will move up to fill the "empty" space.

The better approach is to use the ArrayEnumKey() UDF from the UDF Forum and enumerate all printers. Then in a second, you'd loop through the listed printers and remove them
code:
;pseudo-code
$printers=arrayenumkey('HKEY_CURRENT_USER\Printers\Connections')
for each $printer in $printers
$print=split($printer,',')
$rc=delprinterconnection($print[4])
next



[ 29. July 2003, 14:28: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.