Showing results for 
Show  only  | Search instead for 
Did you mean: 
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.

Labels (1)
0 Kudos
(2) Replies
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
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.


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.

0 Kudos