This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Knowledge Base
- :
- How to Use Python with the InstallShield Automation Interface
Subscribe
- Mark as New
- Mark as Read
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
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 it is not already present.
Solution:
The following is an example of using Python to open an existing project and update 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)
No ratings