Hello,

I'm having some trouble creating a script to add network printers separately by group
Example:

 Code:
Group 01>> Printer \\Server03\HP-Group01

If InGroup("Group01") = 0
  $ print = "\\Server03\HP-Group01"
  If AddPrinterConnection($print) = 0
    SetDefaultPrinter($print)
  EndIf
Endif

Group 02>> Printer \\Server03\HP-Group01

If InGroup("Group02") = 0
  $ print = "\\Server03\HP-Group02"
  If AddPrinterConnection($print) = 0
    SetDefaultPrinter($print)
  EndIf
Endif

Group 03>> Printer \\Server03\HP-Group01

If InGroup("Group03") = 0
  $ print = "\\Server03\HP-Group03"
  If AddPrinterConnection($print) = 0
    SetDefaultPrinter($print)
  EndIf
Endif


I did something simple but I'm trying to improve the script, anyone have any tips on how to improve this structure? I'm trying to create the script using the ini files
_________________________