cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Set All Component 64bit option to “YES “using Installshield Automation Interface script

Set All Component 64bit option to “YES “using Installshield Automation Interface script

Summary

Set All Component 64bit option to “YES “using Installshield Automation Interface script

 

Symptoms

In a project which contains a large amount of components changing  64bit option to YES manually is time consuming.

Resolution

It is possible to use Installshields Automation Interface functionality to automate this process.  The example below uses  vbscript code to set all the component 64 bit option to YES.

You can run the script using vbs editor or you can run the script using “wscript.exe” in cmdlet.

Path to wscript.exe “C:\Windows\System32>wscript.exe”

 

'Create project object for InstallShield 2019
Set pProject  = CreateObject("ISWiAuto25.ISWiProject")
 'Open project your project ism file
pProject.OpenProject "<Path to ISM File>"
'set 64 bit option to YES for single component 
Set pComponent = pProject.ISWiComponents.Item("<Your Component name>")
pComponent.Attrib64BitComponent = "True"
'Set 64 bit option to YES for all component in ISM

Set pComponent = pProject.ISWiComponents
‘Msgbox pComponent.Count
For Each pComponent in pProject.ISWiComponents
'Setting Component to 64bit
pComponent.Attrib64BitComponent = "True"
'Setting Dot Scan option to None
pComponent.DotNetScanAtBuild = 0
Next
'Adding a Product Config and Release
pProject.AddProductConfig("Prod config").AddRelease("Release")
'Set an existing product configuration
Set productconfig = pProject.ISWiProductConfigs.Item("Prod config")
'Set and existing release
Set Release = productconfig.ISWiReleases("Release")
'Build the release
 Release.Build()
'Save and close
pProject.SaveProject
pProject.CloseProject

 

Reference Link:

https://docs.flexera.com/installshield24helplib/installshield24helplib.htm#helplibrary/IHelpAutoISWIComponents.htm

Was this article helpful? Yes No
0% helpful (0/1)
Comments

Firstly - doesn't work as detailed with IS2019.

Script has an invalid character.

Also - 64-bit OS requires 32-bit cscript or wscript.

But even launching the script from C:\Windows\syswow64\ makes no difference.

Still see the error:

scriptname.vbs (2, 1) Microsoft VBScript runtime error: ActiveX component can't create object: 'ISWiAuto25.ISWiProject'

 

Make sure you have install shield 2019 installed in your machine and try to run the script using:

'Create project object for InstallShield 2019
Set pProject  = CreateObject("ISWiAuto25.ISWiProject")

'Open project
pProject.OpenProject "C:\InstallShield 2019 Projects\Patch test.ism"

'set 64 bit option to YES for single component 

'Set pComponent = pProject.ISWiComponents.Item("notepad.exe")

'pComponent.Attrib64BitComponent = "True"

'Set 64 bit option to YES for all component in ISM

Set pComponent = pProject.ISWiComponents

Msgbox pComponent.Count

For Each pComponent in pProject.ISWiComponents

'Setting Component to 64bit

pComponent.Attrib64BitComponent = "True"

'Setting Dot Scan option to None

pComponent.DotNetScanAtBuild = 0

Next

'Save and close
pProject.SaveProject
pProject.CloseProject 
Component number.PNG

Version history
Last update:
‎Feb 02, 2021 03:48 AM
Updated by:
Contributors