Summary
Automation Interface C#Synopsis
The sample automation script that Installshield ships with its products are written in VBScript. However, any language that provides automation support should work. This article provides just a small piece of C# code that retrieves the ProductName from a Product Configuration.
Discussion
To use the automation interface in C#, you must declare private IswiAuto21.ISWiProject ISWiProject before using the automation code. If you are using a Windows Application, this might best be declared in the Form's class. For example:
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label1private IswiAuto20.ISWiProject ISWiProject;
...
...
}
After this, you can begin using the object. This sample code is being called in a pushbutton's click event on the form and populates a label on the same form with the Product Name.
private void button1_Click(object sender, System.EventArgs e)
{ISWiProject = new IswiAuto20.ISWiProject();
ISWiProject.OpenProject("C:\\ProductA.ism",false);
label1.Text = ISWiProject.ISWiProductConfigs[1].get_ProductName();
ISWiProject.CloseProject();
}Additional Information
InstallShield 2013: IswiAuto20.ISWiProject
InstallShield 2012 Spring: IswiAuto19.ISWiProject
InstallShield 2012: IswiAuto18.ISWiProject
InstallShield 2011: IswiAuto17.ISWiProject
InstallShield 2010: ISWiAuto16.ISWiProject
InstallShield 2009: ISWiAuto115.ISWiProject
Related Articles
Create a Major Upgrade 6Number of Views Use PowerShell to Create a Project and Add a PowerShell Custom Action Using the InstallShield Automation Interface 15Number of Views How to Configure a Major Upgrade 7Number of Views Set All Component 64bit Option to “YES “ Using Installshield Automation Interface Script 14Number of Views Update Suite Progress Bar using InstallScript CustomAction 12Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add additional feedback (optional)
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
|
FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513
(toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367
(toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895
2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Revenera Assistant
Case id: 00001065
Activity: Status change: 2 hours ago