Sorry, I'm a layman on the subject and maybe I can't express myself more correctly. To delete the printer I managed to solve.

Now, I need to map the printers for users according to their groups.
I have groups created in AD for printer, for installation I wanted to add the user in the group so that the printer is mapped. Is that possible?

Example:
Informatics industry
AD group created for printer: imp_FORMIM01 (I added this group in the printer security on the print server)
Print server: INFRATI03
Printer Group: imp_FORMIM01
Printer name: Suppliers - Ricoh SP 377 SFNwX

What I have so far and it didn't work was the following:

    IF ADDPRINTERCONNECTION ("\\ INFRATI03 \ FORMIM01") = 0
       ? "ADDED PRINTER CONNECTION ...."
    ENDIF

I think the group part is missing.