Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-23-2014, 10:59 PM
innomatics innomatics is online now
Registered User
 
Join Date: 09-23-2014
Posts: 2
Store exit code in temporary macro

I would like to be able to store the exit code of the program command in a temporary macro during a build step.

This is so I can decide, based on the exit code whether to execute a future step.

For example, an installation returns with code 3010 to signal the install succeeded, but a reboot is required. I have added this exit code to the Success exit codes which is fine, but I think I need to set the temp macro to the exit code value in the post step event. Is this possible?
Reply With Quote
  #2  
Old 09-24-2014, 05:47 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Either

1) In the step's vbld_StepDone script event, store the value like so:

Code:
vbld_TempMacros.Add "TEMP_EXIT_CODE", vbld_TempMacro("RUNPROGRAM_EXITCODE").Value
http://www.kinook.com/VisBuildPro/Ma...riptevents.htm
http://www.kinook.com/VisBuildPro/Ma...gramaction.htm
http://www.kinook.com/VisBuildPro/Ma...scriptmisc.htm

or

2) Add a Set Macro step following the step that runs the program and set a temp macro's value to %RUNPROGRAM_EXITCODE%

http://www.kinook.com/VisBuildPro/Ma...acroaction.htm
Reply With Quote
  #3  
Old 09-24-2014, 06:35 PM
innomatics innomatics is online now
Registered User
 
Join Date: 09-23-2014
Posts: 2
Thumbs up

Thanks very much
Reply With Quote
Reply

Tags
exit code macro


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 11:21 AM.


Copyright © 1999-2023 Kinook Software, Inc.