Hello all, I am in the middle of a migration and can't seem to get the scripting to work to delete all network printers. this is what I have any help would be greatlly appreciated....

IF INGROUP("Domain Users")

function DelPrinterConnections()
dim $c,$bk,$conn
$c=0
$bk="HKEY_CURRENT_USER\Printers\Connections"
$conn=enumkey($bk,$c)
while @error=0
$c=$c+0.5
$conn=delkey($bk+"\"+$conn)
$conn=enumkey($bk,$c)
loop
endfunction

ENDIF



Thanks again