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

How to automatically add features and components to an .ISM project

I have never done this - but needs to be done now.

By using the ISWiProject, I hear that it should be possible to add files to my Installshield 2009, project. My project type is an Installscript MSI Project. I would like to use C# code to create features and components. The features and components are defined in an XML file. My C# code will parse the XML code, and update the features and components accordingly.

Can you get me started with a sample code?

This seems like a tough puzzle to me. Please help.

Elizabeth.
Labels (1)
0 Kudos
(2) Replies
RobertDickau
Flexera Alumni

Searching the help (and these forums and the KB) for the method names AddFeature and AddComponent will give some information. The examples are generally in VBScript, but others here have had some success using the Automation interface with C#, C++, Perl, etc.
0 Kudos
ejesuraj
Level 3

With the help of information from the Automation Interface, InstallShield 2009 Help library, I was able to add features and Components to my .ISM project successfully.

Now to each of the components created, I need to add Component Sub folders. So I added the following in my c# code,

CompSubFolder = Mycomponent.AddComponentSubFolder("subfolder1");

I get the error message "This method is not supported for InstallScript MSI Project. You need to remove the line that calls the method from your automation code.

>ISWiAutomation.ISWiComponent.AddComponentSubFolder".

The same command worked on an InstallScript project, but not with my InstallScript MSI project.

Now the question is what should I do to add subfolders in my MSI project.

Thanks in Advance for your help.

Elizabeth.
0 Kudos