Hi ITDaddy, and welcome to the board.

You should place your code between code tags.

Is the code you are posting part of a logon script or is it part of a utility?

The reason I ask is because if this is a logon script there would be not reason to loop thru all your PC's and you could use the @WKSTA macro to retrieve the PC name.

If this is part of a utility to look at each PC, it will be hard to find out if it had trouble logging in or whatever.

It might be best if you post your entire code so that we can better help you.
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)