Well... ExistKey() has been deprecated long ago. ISTR its logic was the reverse to KeyExist().

As for DelPrinterConnection(), I don't know if you can use a comma to separate server from printer. I think it should be \\server\printer.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.