Mike

I am full o lame jokes Mike

The $what_rm seems to be always 0 from what you have posted.

When I said your script should look like this:

$SysNo = substr(@wksta,LEN(@WKSTA)-2,2)

IF $SysNo < "30"
AT (4,4) "$SysNo is connecting to U18"
addprinterconnection(\\upperserver\EpsonU18)
addprinterconnection(\\upperserver\KyoU18)
else
At (4,4) "$SysNo is connecting to U26"
addprinterconnection(\\upperserver\KyoU26)
addprinterconnection(\\upperserver\EpsonU26)
endif

I meant copy this code and test it out in a test script!

The variable $SysNo SHOULD be the last two digits of your workstation number!

We'll get there!
Rgds
Don