Code:
shell '%ComSpec% /C net localgroup localgroupname username /add >nul'
"Errorlevel net localgroup: " @error



should do

[Edit: forget the above, just realize that you psexec it ]

M..maybe if you redirect the error stream to a file and then read that later on?

Code:

Shell "psexec.exe \\192.168.2.10 -u @domain\Admin -p Password -i" + " cmd /c net localgroup Administrator " + chr(34) + "Domain\Admins" + chr(34) + " /add 2>[path]error.txt"




then, open(), readline(), close()


Edited by Jochen (2005-09-21 02:48 PM)
_________________________