Untested.

Code:

$line = "%compspec% /c c:\someapp.exe /" + @userid

Shell $line

If @error <> 0
?"External app returned an error."
?@ERROR
Sleep 5
LogOff(1)
Else
;do other script stuff here.
EndIf

_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.