k, change in the $printercmd line the /z switch to /Z (uppercase) and it will share the printer.