View Full Version : Automation Fails

10-28-2003, 05:22 PM
I'm attempting to implement my first build via the automation interface, and I appear to be about there, but I'm getting an error. Basically, I'm able to do the following with my InstallScript project:

Instantiate 1.) a project object, 2.) configuration object, 3.) Release object

I then attempt to build and there is a delay, however, the build did not occur (based on a peek at \Media contents).

I'm threw in some code to display the BuildErrorCount, and BuildWarningCount (both display "1"), however the Err object does not contain a count or description of the error.

I've tried building the same project with the IsSABld.exe utility and it builds fine . . .

Any ideas on how to debug this one?


10-28-2003, 05:42 PM
Hmmmm . . . What's this "CubFile" Property? According to the help file, it must be specified prior to calling the "Build" method.

10-28-2003, 05:47 PM
Nope "CubFile" is only for MSI installs . . . the install I'm attempting to build is a InstallScript style.

10-28-2003, 05:57 PM

You can implement the StatusMessage event of the ISWiRelease to see what is going on in the build.

Private WithEvents pRelease As ISWiRelease

Private Sub Command1_Click()
Dim pProductCfg As ISWiProductConfig
Set pProductCfg = pProject.ISWiProductConfigs("Media")

Set pRelease = pProductCfg.AddRelease("MyRelease")
End Sub

Private Sub pRelease_StatusMessage(ByVal sMessage As String, pbCancel As Boolean)
' Check sMessage....
End Sub

Hope this helps.
Hidenori Yamanishi
InstallShield Software Corporation

10-29-2003, 01:54 PM
Well . . . I'm still unable to build. Here's what I've done, I created a very simple InstallScript test install that only delivers Notepad.exe (that's all). The install builds fine. I moved the install to my "build box" and ran the IsSABld.exe utility and it built fine. Next, I ran my script. No joy! Still getting 1 build error and nothing in the error log.

The script (for anyone that might assist):



<script language="VBScript">

strISProject = "E:\Projects\Foo\Foo.ism"

set m_oISPrj = CreateObject("SAAuto9.ISWiProject")
m_oISPrj.OpenProject strISProject, True

set m_oISConfig = m_oISPrj.ISWiProductConfigs.Item("Media")
set m_oISReleases = m_oISConfig.ISWiReleases

WSCript.Echo m_oISReleases.Item(1).Name
WSCript.Echo "Build Location: " & m_oISReleases.Item(1).BuildLocation

set m_oRel = m_oISReleases("New CD-ROM Media")

'm_oRel.UseProjectSkin = True
'm_oRel.SkinName = "Setup3.Skin"

' ----- Build the Install -----

WScript.Echo "Build Error Count: " & m_oISReleases.Item("New CD-ROM Media").BuildErrorCount


' ----- Clean Up -----
set m_oRel = Nothing
set m_oISReleases = Nothing
set m_oISPrj = Nothing




10-29-2003, 05:08 PM
Could you check the build log to see what build error you received? The log file is located in \Media\New CD-ROM Media\Log Files folder under your build location. The filename is the date and time that you run the build.

Thank you,
Hidenori Yamanishi
InstallShield Software Corporation

10-30-2003, 08:14 AM
The file is there, but there is nothing in it (0 byte file).

Again, the using IsSABld.exe, the install builds fine - no errors . . .

10-30-2003, 02:03 PM
I've added some error detection in the script; basically, I clear the Err object before calling the Build() method, when I return, and test the Err object and get the following:

Err.Number = 424
Err.Description="Object Required"

Still not sure WHAT object it needs . . .

10-30-2003, 02:29 PM
Thank you for the updates. I would like to determine if Err.Number=244 is actually coming from ISWiRelease.Build(). Could you just set a release setting such as the Demo File Name and verify it in the IDE if the value is saved?

m_oRel. DemoFileName = "My Demo File"

I would like to work with you on this issue offline. Please reply to me at hidenoriy@installshield.com. I will post more information when we figure it out.



10-31-2003, 02:36 PM
The problem seems to be that the NT Services Object is not getting recognized by the automation components. Building with IsSABld.exe on the same system works fine. The object install was run on the system and the "ObjectsPro" directory was created in the "StandaloneBuild9" directory.

How do I get the objects visable to the Automation interface comonents (SASuto9.dll)???

10-31-2003, 06:39 PM
The issue is that \Program Files\Common Files\InstallShield\Objects\ismk9.dll cannot find the \StandAlone\MediaBuild40.dll to process the NT Services object when the standalone automation layer is used. As a workaround for now, please copy the MediaBuild40.dll to \Program Files\Common Files\InstallShield\Objects folder. The code fix will be in DevStudio 9 SP1.

Thank you for the feedback.

Best regards,
Hidenori Yamanishi
InstallShield Software Corporation