|Thank you IVO,|
What I'm trying to achieve is create a script to install 4 to 5 printers, this is what I have so far:
REM @ECHO OFF
REM Add the TCP/IP Ports
FOR %%s IN (6,7) DO cscript prnport.vbs -a -r IP_135.218.135.%%s -h 135.218.135.%%s -o raw -n 9100 -me -y public -i 1
REM Install the Dell 5110cn Printer Driver
cscript prndrvr.vbs -a -m "Dell Color Laser 5110cn PCL6" -i c:\dell\drivers\5110cn-a04\Win_x32\PCL\English\dlxzizi.inf -h c:\dell\drivers\5110cn-a04\Win_x32\PCL\English
REM Add Printer to the corresponding port THIS WHERE I GET STUCK!
FOR %%c IN (6,7) DO (FOR %%t IN (01,02) DO cscript prnmngr.vbs -a -p "DELL%%t" -m "Dell Color Laser 5110cn PCL6" -r IP_135.218.135.%%c)
In the last instruction, I'm trying to use 2 variables, one for the naming of the printer and the other one for the port.So it will name them like this:
DELL01 with port 220.127.116.11
DELL02 with port 18.104.22.168
The last instruction names the printers, but assigns both to the first port only, I'm really close but I'm stuck. I'll appreciate your help.