Looks like that did it Glenn.

Existing script now limits a user to only 2 app sessions, message pops up on third attempt.

I'm going to re-write the whole thing in keeping with your suggestions.

One further question with that however. You mention that
 Quote:
Embedding vars and macros in strings is bad


Wouldn't that mean that this particular VAR is 'bad' as well?

 Code:
$cer = '\\root\userconfigs$$\@userid\production'


I would presume that I should instead be stating this as

 Code:
$cer = '\\root\userconfigs$$\' + @userid + '\production'


Can't say thanks enough for all your help on this . .but I'll try \:\) thanks again,

TS