Kinook Software Forum

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

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-07-2007, 03:35 PM
BrandonG BrandonG is online now
Registered User
 
Join Date: 11-13-2006
Posts: 12
Failed to add Run Script script code: Unknown error

I am receiving the error message in the subject when a particular step executes. The step is a vbs script that runs for setting up email notifications based on certain conditions. When it fails, which it does every time the first time it hits it, I restart it and it completes successfully. The same code is called later and it also completes successfully. It just seems as though the script fails the first time only. Below is the step code.

I have verified that all of the macros referenced exist. The other thing to mention is that this step was copied from another bld script where it does NOT exhibit this problem.

Your help is appreciated.

<step action='Run Script'>
<Language>VBScript</Language>
<Script><![CDATA[dim BuildType, BUILD_EMAIL_Install, BUILD_EMAIL_SEND

Dim BUILD_EMAIL_MESSAGE
Dim BUILD_EMAIL_MESSAGE_Header, BUILD_EMAIL_MESSAGE_BUILD, BUILD_EMAIL_MESSAGE_Footer, BUILD_EMAIL_MESSAGE_Failure

BuildType = "%BUILDTYPE%"
BUILD_EMAIL_SEND=TRUE
BUILD_EMAIL_MESSAGE_BUILD=""
BUILD_EMAIL_MESSAGE_Failure=""

IF BuildType="INTEGRATION" THEN
BUILD_EMAIL_MESSAGE_BUILD = _
"DB REV: %SS_DBREV% " & vbcrlf & _
"Output: <%Delivery_Directory_BUILD%>." & vbcrlf
BUILD_EMAIL_Install=application.Macros(vbldProject ).Item("Build_Email_Install")
ElseIf BuildType="DAILY" THEN
BUILD_EMAIL_MESSAGE_BUILD = "Output: <%Delivery_Directory_BUILD%>." & vbcrlf
BUILD_EMAIL_Install=""
ElseIf BuildType="CUSTOM" THEN
BUILD_EMAIL_MESSAGE_BUILD = "The package can be found <%Delivery_Directory_BUILD%>"
BUILD_EMAIL_SEND=FALSE
End If





BUILD_EMAIL_MESSAGE_Header = _
"Product: %Main_Product_Name% " & vbcrlf & _
"Module: %Build_Module% " & vbcrlf & _
"Build Type: %BUILDTYPE% " & vbcrlf & _
"Complete Dttm: %DATETIME%" & vbcrlf & _
"Merge Module: %MSM_File%" & vbcrlf & _
"Build Status: %BUILD_STATUS%" & vbcrlf & vbcrlf

IF "%BUILD_STATUS%"<>"SUCCESS" THEN
BUILD_EMAIL_MESSAGE_Failure = _
"-- FAILURE DETAIL --" & vbcrlf & _
"Failed Step: %FailStep_Name%" & vbcrlf & _
"Step Output: %FailStep_Output%" & vbcrlf & _
"Step Status: %FailStep_Status%" & vbcrlf & vbcrlf
END IF

BUILD_EMAIL_MESSAGE_Footer = "This build was run by %BUILD_INDUCER_NAME% on %COMPUTERNAME%." & vbcrlf

BUILD_EMAIL_MESSAGE = BUILD_EMAIL_MESSAGE_Header & BUILD_EMAIL_MESSAGE_BUILD & BUILD_EMAIL_MESSAGE_Failure & BUILD_EMAIL_MESSAGE_Footer


application.Macros(vbldTempoary).Add "BUILD_EMAIL_MESSAGE",BUILD_EMAIL_MESSAGE
application.Macros(vbldTempoary).Add "BUILD_EMAIL_Install",BUILD_EMAIL_Install
application.Macros(vbldTempoary).Add "BUILD_EMAIL_SEND",BUILD_EMAIL_SEND

SET BuildType =nothing
set BUILD_EMAIL_Install =nothing
set BUILD_EMAIL_SEND =nothing

set BUILD_EMAIL_MESSAGE =nothing
set BUILD_EMAIL_MESSAGE_Header =nothing
set BUILD_EMAIL_MESSAGE_BUILD =nothing
set BUILD_EMAIL_MESSAGE_Footer =nothing
]]></Script>
<buildfailsteps type='11'>0</buildfailsteps>
<indent type='3'>1</indent>
<name>SET RECIPIENTS/MESSAGE</name>
</step>
Reply With Quote
 


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 12:36 PM.


Copyright © 1999-2023 Kinook Software, Inc.