Thanks for your bug report. I have not been able to run this script as it reports "Can't load XML information". That said, if the COM call fails, it should always set $comerr.