hmm. i just copy and past your script and this seems to work:)

but it gives error : NEXT without FOR!

i did not test it but does this also work on non citrix clients?
or goes that code after the NEXT?