How to use Python with the Installshield Automation Interface

How to use Python with the Installshield Automation Interface

Discussion:

InstallShield automation is implemented as a COM object, hence it can be accessed from any language that supports com extensions.

Python (32-bit version) supports writing COM clients using win32com.client module. This module can be installed "python -m pip install pywin32" if not already present.

Solution:

The following is an example of using Python to open an existing project and updating some of the contents:

import win32com.client
o = win32com.client.Dispatch("ISWiAuto26.ISWiProject")
o.OpenProject("C:\InstallShield 2020 Projects\Test.ism")
print(o.ProductName)
print(o.ProductVersion)
prodconf = o.ISWiProductConfigs("Product Configuration 1")
prodconf.Title= "Flexera"
prodconf.Subject= "InstallShield"
print(prodconf.Title)
print(prodconf.Subject)
Was this article helpful? Yes No
No ratings
Version history
Revision #:
2 of 2
Last update:
‎Feb 04, 2021 03:26 AM
Updated by:
 
Contributors