Jump to content

Recommended Posts

Posted

I have the printer script below that works a treat in my school....I want to use it else where but theres one bit that I dont understand...What do the parts (1,1,9) (10,1,15) (16,1,33) etc do?

 

Thanks

 

FOR /L %%a IN (1,1,9) DO IF "%COMPUTERNAME%"=="SLT0%%a" GOTO ICTPrinter02

FOR /L %%a IN (10,1,15) DO IF "%COMPUTERNAME%"=="SLT%%a" GOTO ICTPrinter02

FOR /L %%a IN (16,1,33) DO IF "%COMPUTERNAME%"=="SLT%%a" GOTO ICTPrinter02

 

FOR /L %%a IN (1,1,9) DO IF "%COMPUTERNAME%"=="GPRM0%%a" GOTO ICTPrinter02

FOR /L %%a IN (10,1,15) DO IF "%COMPUTERNAME%"=="GPRM%%a" GOTO ICTPrinter02

FOR /L %%a IN (16,1,33) DO IF "%COMPUTERNAME%"=="GPRM%%a" GOTO ICTPrinter02

 

:ICTPrinter02

 

cscript %systemroot%\system32\prnmngr.vbs -x

rem cscript %systemroot%\system32\prnmngr.vbs -ac -p "\\%GPSSVR%\ICT01_Black"

cscript %systemroot%\system32\prnmngr.vbs -ac -p "\\%GPSSVR%\ICT02_Colour"

cscript %systemroot%\system32\prnmngr.vbs -t -p "\\%GPSSVR%\ICT02_Colour"

Posted (edited)

Normal loop type,

 

Start, Step, End.

 

Aka, Start at 1, Increase in 1, End at 9 etc

 

Example - (5,-1,0) = 5, 4, 3, 2, 1, 0 etc

(10,5,50) = 10, 15, 20.... 45, 50

 

If that made sense :p

 

Steve

Edited by Steve21

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...