View Full Version : How do I Log a Build via Automation

07-24-2002, 12:41 AM
I currently have a small VB utility that I am using to do our builds using the Automation interface for Installshield Developer 7.03.

What I was wondering was, is there some way that I can have access to the information produced by the build (in the IDE it appears in the build tab of the output window) via the Automation interface?

Otherwise there is no way of telling whether a build was successful or not until it is run.

Please Help


Scott Duckworth
07-24-2002, 07:03 AM
I'm currently using Developer 7.02 and what I do is scan the logfile using the FileSystemObject and look for the line that reads 0 errors and 0 warnings. If I find it, the build is ok. I think in Developer 7.03 they have a propertys that holds the number of errors and warnings after a build, but you will have to look into that.

07-24-2002, 07:56 AM
For example:

' ### TO DO: change these values
Const PROJECT = "C:\MySetups\SampleApp.ism"
Const CONFIG = "Version 1"
Const RELEASE = "cdrom"

Set oISM = CreateObject("ISWiAutomation.ISWiProject")

' open the project as read-only
oISM.OpenProject PROJECT, True

Set buildThisOne = oISM.ISWiProductConfigs(CONFIG).ISWiReleases(RELEASE)

buildThisOne.Build( )

' Note: starting with 7.03, you can check BuildWarningCount and BuildErrorCount
' afterward to ensure build was successful

WScript.Echo "Warnings: " & buildThisOne.BuildWarningCount & vbNewLine & _
"Errors: " & buildThisOne.BuildErrorCount

Set buildThisOne = Nothing: Set oISM = Nothing