This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- InstallShield Automation: Need to add folders
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 21, 2013
04:33 AM
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.
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.
- Tags:
- automation
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 23, 2013
02:20 AM
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!
Creating folers and specifying its files seems to the most basic thing anyone would want to do with the Automation Library!