Thanks for the info, this will surely help in the near future. Someone told me another way to, I'll will copy his answer here.
******************************
I just did this test in SQL 7.0.
I created a simple package that just had 1 Activex Script Task:
code:-------------------------------------------------------
Function Main()
Main = DTSTaskExecResult_Failure
End Function
------------------------------------------------------------
From the command-line I ran DTSRUN utility, after which I checked the status of errorlevel, the DOS error status variable and it was set to 1, error. A value of 0 is success.
c:\ dtsrun /S nike /E /Ptest /M
c:\ echo %errorlevel%
*****************************
So this is what I used.