It's here:
code:
If ADDPRINTERCONNECTION ("\\server1\hp laserjet 4") = 0
If ADDPRINTERCONNECTION ("\\server1\hp lj4 serverroom") = 0
If ADDPRINTERCONNECTION ("\\server2\Colorprinter ") = 0
Endif

Three nested IFs with just one ENDIF. This will cause your script not to run correctly.
And your script did not run correctly because of removing :END.
_________________________
There are two types of vessels, submarines and targets.