View Single Post
  #2  
Old 09-09-2003, 08:21 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 5,758
Unfortunately, cabarc.exe doesn't return a non-zero exitcode in most error situations. You would need to parse the program output for error strings and fail the build if any are found. Here is one way it could be done (you can copy and paste the text below into VisBuildPro; it assumes VBScript is set as your default script language; the script code is accessed within VBP by clicking the Script Editor button within the step properties dialog and switching to the Step tab):


<step action='Run Program' type='0'>
<command>cabarc -s 6144 n %TEMP%\MyApp.cab c:\nonexist.ini</command>
<name>call cabarc</name>
<outputfrom type='3'>1</outputfrom>
<script><![CDATA[
Function vbld_StepDone()
' look for the string ' failed' in the cabarc output and fail the build if found
If InStr(Application.Macros(vbldMacroSystem)("LASTSTE P_OUTPUT"), " failed") <> 0 Then _
Err.Raise 1, Step.Name, "cabarc utility failed"
End Function
]]></script>
</step>
Reply With Quote