Sander,

using rcmd in a script would be better fired off with a single command attached :

code:

shell '%Comspec% /C rcmd \\Yourserver yourcommand /yourparams > nul 2>nul'

(This will execute the command line on the remote Server and afterwards closes the rcmd session !)
! : the errorlevel returned is always the errorlevel from rcmd.exe (1 = ok !)


To catch the error of a rcmd'd command you might wanna try this :

code:

shell '%ComSpec% /c (rcmd \\Server command) > nul 2>nul'

@error ?
get $


Untested , cos I'm @home !


Another opportunity might be :

code:

shell '%ComSpec% /c (rcmd \\Server command) |find "Whatever" >nul'
@error ;(of find.exe)
get$

... think You'll have to check what's best !

Have a nice August !
C'ya in September

Jochen

_________________________