InstallShield Tips and Techniques

May 7, 2014

Resolution to ActiveX component can’t create object: ‘SAAuto1050.ISWiProject’

Filed under: Reference Materials — shieldmaster @ 4:22 am

Our Build automation was recently switched to a WinServer 2008 Operating System, and we encountered an error when running the InstallShield Automation Object that we used to modify project’s version number. The error “ActiveX component can’t create object” was issued against the Automation “SAAuto1050.dll”. Had to put it aside to handle other more pressing issues, until I was able to deal recently.

Turns out the InstallShield automation is a 32bit process, but the 64bit Operating System was running a 64bit version of CScript – which caused the issue. The easiest solution was to force the execution of the 32bit CScript process. Here is a snippet of an ANT script that builds a VBScript script that is used to update the InstallShield project and inject the current build number:

      
 

    <!– ============================================================================================ –>

    <!—First establish the correct Product Version using the current build number variable. –>

    <!– ============================================================================================ –>

    <property file=”${basedir}\build.number”/>

    <property name=”ProdVersion” value=”${release.number}.${version.number}.${servicepack.number}.${build.number}”/>

 

<!– ============================================================================================ –>

<!– Create the SetAgentScreenCaptureProductVersion.vbs file to take the build number and –>

<!– place it in the ProductVersion property in the ism before the install is built. –>

<!– ============================================================================================ –>

<echo file=”${Agent}\src\install\SetAgentScreenCaptureProductVersion.vbs” message=”‘——————————————————————————————-${line.separator}” append=”false”></echo>

<echo file=”${Agent}\src\install\SetAgentScreenCaptureProductVersion.vbs” message=”‘This Script is designed to take the build number from build.number and place it in${line.separator}” append=”true”></echo>

<echo file=”${Agent}\src\install\SetAgentScreenCaptureProductVersion.vbs” message=”‘the .ism file before the install is compiled.${line.separator}” append=”true”></echo>

<echo file=”${Agent}\src\install\SetAgentScreenCaptureProductVersion.vbs” message=”‘——————————————————————————————-${line.separator}” append=”true”></echo>

<echo file=”${Agent}\src\install\SetAgentScreenCaptureProductVersion.vbs” message=”${line.separator}” append=”true”></echo>

<echo file=”${Agent}\src\install\SetAgentScreenCaptureProductVersion.vbs” message=”dim pProject, pProductCode${line.separator}” append=”true”></echo>

<echo file=”${Agent}\src\install\SetAgentScreenCaptureProductVersion.vbs” message=”set pProject = CreateObject(&quot;SAAuto1050.ISWiProject&quot;)${line.separator}” append=”true”></echo>

<echo file=”${Agent}\src\install\SetAgentScreenCaptureProductVersion.vbs” message=”${line.separator}${line.separator}” append=”true”></echo>

<echo file=”${Agent}\src\install\SetAgentScreenCaptureProductVersion.vbs” message=”pProject.OpenProject(&quot;${Agent}\src\install\ScreenCapture.ism&quot;)${line.separator}” append=”true”></echo>

<echo file=”${Agent}\src\install\SetAgentScreenCaptureProductVersion.vbs” message=”pProject.ProductVersion = &quot;${ProdVersion}&quot;${line.separator}” append=”true”></echo>

<echo file=”${Agent}\src\install\SetAgentScreenCaptureProductVersion.vbs” message=”pProject.SaveProject${line.separator}” append=”true”></echo>

<echo file=”${Agent}\src\install\SetAgentScreenCaptureProductVersion.vbs” message=”pProject.CloseProject${line.separator}” append=”true”></echo>

 

<!– ============================================================================================ –>

<!– Finished creating SetAgentScreenCaptureProductVersion.vbs, now execute with 32bit process. –>

<!– ============================================================================================ –>

    <exec executable=”c:\Windows\SysWOW64\cscript”>

    <arg value=”${Agent}\src\install\SetAgentScreenCaptureProductVersion.vbs”/>

    </exec>

That bit of ANT Script will create a file “SetAgentScreenCaptureProductVersion.vbs” that looks like this:

‘——————————————————————————————-

‘This Script is designed to take the build number from build.number and place it in

‘the .ism file before the install is compiled.

‘——————————————————————————————-

 

dim pProject, pProductCode

set pProject = CreateObject(“SAAuto1050.ISWiProject”)

 

 

pProject.OpenProject(“ScreenCapture.ism”)

pProject.ProductVersion = “1.00.0000.073”

pProject.SaveProject

pProject.CloseProject

 

With a bit of additional work, I could reduce the overhead by quite a bit, but its working correctly now, and there are other items to address.

Hope this helps!

ShieldMaster

Advertisements

1 Comment »

  1. If you launch c:\windows\syswow64\cmd and launch cscript, it will launch as a 32 bit process.

    Comment by john sullivan — June 13, 2014 @ 5:05 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: