I have been searching on the internet for ways to create InstallShield setups using c#. I came to know that there is one ” InstallShield Automation Library” available for it. But, all the examples I have seen so far only automate the task of building projects already created.
InstallShield Automation Using c#
However what I need is this:
- I would first create an InstallShield project (.ISM) manually
specifying details such as folder structure etc - Then, I want to create a program that will copy the ISM file with
the new version name, add files to the newly created project file
and then build it.
Please let me know if its possible and how to proceed.
EDIT: I just came to know that the directories created during installation are called features. So the question may be read as “How to add feature to project file and add files to that feature”
EDIT2 I have found a way of iterating it here:
http://blogs.flexerasoftware.com/installtalk/2010/12/getting-started-with-installshield-automation-and-c.html
Maybe this can help someone prepare the answer.
In simplest terms, in MSI world, a file belongs to a component.
And the file will be installed if the feature associated with the component is installed.
So, your task would be to create a component, add the file to it and associate it with a feature.
For instance, if you have a feature with name feature1, use the following:
proj.ISWiFeatures.Item(“feature1”).AttachComponent(comp)
There’s a whole lot of things that you can do via the Automation interface. See the documentation here:
http://helpnet.installshield.com/installshield16helplib/IHelpAutoISWiProject.htm
–Jag