Curious though... how come you chose to do it this way instead of just using the built in INGROUP?

 Code:
if Ingroup("blah")
  $rc=addprinterconnection("printer")
endif