I did some testing with printing the variables to the screen. I think the problem is here:

 Code:

For Each $SiteName in $Mappings

  ; create a 2-element array by splitting the data at the comma
  ; element 0 contains the network/mask, and element 1 contains the printer UNC
  $NetPrint = Split(ReadProfileString('.\netprint.ini', 'MAPPINGS', $SiteName), ',')

  ; see if the local IP is inside the network
  If InSubnet($MyIP, $NetPrint[0])

    ; these print statements are for diagnostic/testing
    'My ip address (' $MyIP ') exists in the ' $SiteName ' site (' $NetPrint[0] ')' ?
    'Mapping printer ' $NetPrint[1] ?

    ; make the printer connection
    AddPrinterConnection($NetPrint[1])

    ; show that at least 1 printer mapped successfully
    If Not @ERROR
      $Mapped = 1
    EndIF

  EndIF

Next


When the user logs in initially, this doesn't run. I did a
 Code:
 ? $SiteName ? 
inside that For Each and it doesn't show on logon. It does show up and run correctly when run manually after the user logs in. Anyone seen this behavior before?