cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
akshayj
Level 2

InstallShield Automation: Need to add folders

I have been given one task to programatically create IS msi setups. I found that IS Automation can help me out.

The first step I followed was to examine one already existing ISM project. In that project, when opened in IS, shows one feature and I am able to iterate through it using the following code:

string projectPath = @"C:\Documents and Settings\ASD\My Documents\Visual Studio 2005\Projects\ThinkFinanceInstallerMaker\project\Think.16.67-P65.13.2.ism";

ISWiProject project = new ISWiProject();
project.OpenProject(projectPath, false);

foreach (ISWiFeature feature in project.ISWiFeatures)
{
Console.WriteLine("Feature: " + feature.Name);
}

I can see some folders created under it. I can see that these are mere folders(not components) because when I right click the feature there are 2 options:

Create folder
Create Component

And the icons shows that they are mere folders. Now I wanted to iterate through all the folders and their files(and may be their subfolders and their files also).
The following code iterates through all the components and its not of my use because they are not components.

string projectPath = @"C:\Documents and Settings\ASD\My Documents\Visual Studio 2005\Projects\ThinkFinanceInstallerMaker\project\Think.16.67-P65.13.2.ism";

ISWiProject project = new ISWiProject();
project.OpenProject(projectPath, false);

foreach (ISWiFeature feature in project.ISWiFeatures)
{
Console.WriteLine("Feature: " + feature.Name);
foreach (ISWiComponent com in project.ISWiComponents)
{
Console.WriteLine("Component: " + com.Name);
}
}

So I want to know:

How to iterate the folders and their files.
How to create it programatically.
Labels (1)
0 Kudos
(1) Reply
akshayj
Level 2

Anone looking into it. I dont think it is such a difficult thing.
Creating folers and specifying its files seems to the most basic thing anyone would want to do with the Automation Library!
0 Kudos