ok - that's important info!

There's two things to try - one may not require any changes to the code.

1. Create a network/mask,printer for each printer at a site. You'll need unique site-names in my last example. ie:
Site1_printer1=10.32.61.0/24,\\server1\printer1
Site1_printer2=10.32.61.0/24,\\server1\printer2
Site2=10.32.65.0/24,\\server2\printer

This keeps the relationship of network to printer 1:1, even though you can have the same network defined several times. Also, note that the third entry is simply "site2" since there is only one printer. I'd probably stay consistent in the names, though.. The sitenames must be unique to be properly parsed in the ini file.

2. If you use the first example, with two arrays, your Printers array can be something like
 Code:
$Printers='\\server\printer', '\\server2\printer1;\\server2\printer2', '\\server3\printer'


Note that the second element has two printers separated by a semicolon. Thus, you could check for a ";" in the printers string, split the data on the ";", and process each element. The delimiter charachter is arbitrary - I used the ";" because it mirrors the delimiter in path strings and is easily recognized as such. See the code snippet below for an example.

 Code:
$MyIP = Join(Split(@IPADDRESS0, ' '), '')

For $I = 0 to UBound($Networks)
  If InSubnet($MyIP, $Networks[$I])
    'My ip address (' $MyIP ') exists in network $I (' $Networks[$I] ')' ?

    ; if there's a ";" in the printers data, there's more than one to map
    If InStr($Printers[$I], ';')
      $ManyPrinters = Split($Printers[$I], ';')
      For Each $Printer in $ManyPrinters
        'Mapping printer ' $Printer ?
        $Mapped = 1
        AddPrinterConnection($Printer)
      Next
    Else	; just map the single printer
      'Mapping printer ' $Printers[$I] ?
      $Mapped = 1
      AddPrinterConnection($Printer[$I])
    EndIf

  EndIf
Next


Be aware that I haven't tested these code snippets since I'm on break from a training class and time is limited. They should give you a good shove in the right direction, though.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D