Hello,
I've got the following problem. I made a script for users who uses network printers based on the OU in the Active Directory.
But in my script I've got all the commands and I'm missing one to read a second file where all the printers are in.
login.scr
Call "NetworkPrinters 998.scr"
Script 1;
Code:
DIM $PrinterServer
$PrinterServer = "S99808"
DIM $NbrTotal
;
;******************************************************
; Total number of printers
;******************************************************
;
$NbrTotal = 13
DIM $CptLocal
DIM $CptPrinter
DIM $NOLocal[$NbrTotal]
DIM $NbrPrinter[$NbrTotal]
DIM $NOSuite[4]
$NOSuite[0]= "A"
$NOSuite[1]= "B"
$NOSuite[2]= "C"
$NOSuite[3]= "D"
$CptLocal = 0
$CptPrinter = 0
WHILE $CptPrinter < ($NbrPrinter[$CptLocal])
ADDPRINTERCONNECTION ("\\$PrinterServer\P999" + $NOLocal[$CptLocal] + $NOSuite[$CptPrinter])
IF INGROUP("GG999_PRT" + $NOLocal[$CptLocal] + $NOSuite[$CptPrinter])
SETDEFAULTPRINTER ("\\$PrinterServer\P999" + $NOLocal[$CptLocal] + $NOSuite[$CptPrinter])
ENDIF
$CptPrinter = $CptPrinter + 1
LOOP
ENDIF
$CptLocal = $CptLocal + 1
LOOP
And the 2nd;
Code:
;
; Connection P999201
;
$PrinterServer = "S99808"
IF INGROUP("GG999_PRT201")
ADDPRINTERCONNECTION ("\\$PrinterServer\P999201")
ENDIF
;
; Connection P999211
;
IF INGROUP("GG999_PRT211")
ADDPRINTERCONNECTION ("\\$PrinterServer\P999211")
ENDIF
;
; Connection P999221
;
$PrinterServer = "S99808"
IF INGROUP("GG999_PRT221")
ADDPRINTERCONNECTION ("\\$PrinterServer\P999221")
ENDIF
So how I make this thing working. It's obvious that it's easy but I can't figure it out. My mind burned a bit the past days 
Thanks if anybody could help me out!