I've been testing this out and it's clearly very useful.

One problem I'm having though is that I don't seem to be able to get it to return an error code back to the script. Does anyone know a way around this?

Example:

code:
 shell '.\runas /user:administrator /pass:incorrectpassword /w cmd'
? @ERROR " " @SERROR

returns:
code:
Attempting to start "cmd" as user "MR-3211\administrator"...
RUNAS ERROR: Unable to run
1326 - Logon failure: unknown user name or bad password.


0 The operation completed successfully.