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-22-2009, 03:45 PM
isostar isostar is online now
Registered User
 
Join Date: 03-18-2003
Posts: 8
read ini, file missing

I have a problem where I want to fail the build if the file is missing for the read ini action. Currently I have to add a script to the action to check if the action actually set the to anything, else fail.
I would have expected the step to fail if the file could not be found. Not use the default value.
Also I tried to use the default value field to fail the step like this:
[Step.BuildStatus = vbldStepStatFailed]

The thought here was that having to use the default value is the same as failing. But that didn't work either, it just set the value to 0. It must have interpreted it as an comparison not an assignment.

Is there an easy way to fail the step if the file or value in the file is missing?
Reply With Quote
  #2  
Old 09-22-2009, 04:21 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Add code like this to the step's vbld_StepStarting script event:

Code:
If Not vbld_FSO.FileExists(vbld_StepProp("Filename", vbString)) Then
	Err.Raise 1, Step.Name, "INI file not found"
End If
http://www.kinook.com/VisBuildPro/Ma...riptevents.htm
Reply With Quote
  #3  
Old 09-24-2009, 02:04 PM
isostar isostar is online now
Registered User
 
Join Date: 03-18-2003
Posts: 8
Ok, thanks.
I think that this should be a standard option in the read ini action.
Reply With Quote
  #4  
Old 10-14-2009, 06:14 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
This is available in v7.2a.
Reply With Quote
Reply


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 02:21 PM.


Copyright © 1999-2023 Kinook Software, Inc.