
0_murray.mcconnachie asked a question.
Creating Components using Automation in C#
I am trying to add Components and features with Dynamic file links to an InstallScript installer using the Automation library (C/CV2008). I don't seem to be able to find any documentation on how to do this.
I can find details on MSI installers but not InstallScript. We have to use Installscript installers as we need to be able to encrypt the content.
Can anyone point me towards a way to do this.
Thanks
Murray
Some C code to open a project and add one feature and one component would look something like:
// Add reference to ISWiAuto16 COM object
ISWiAuto16.ISWiProject myProject = new ISWiAuto16.ISWiProject;
myProject.OpenProject("C:\\PathToProject\\Project.ism", false);
ISWiAuto16.ISWiFeature feature1 = myProject.AddFeature("NewFeature1");
ISWiAuto16.ISWiComponent component1 = myProject.AddComponent("NewComponent1");
feature1.AttachComponent(component1);
feature1.Encryption = true;
myProject.SaveProject();
myProject.CloseProject();
I will take a look at modifying the project file directly, it's that or do it manually every time ;-(
Thanks for the reply.
Murray
1. Go to installation designer Tab
2. under Application data select Redistributables
3. select setup prerequisite from object type to display combobox
4. select the appropriate checkbox to add .prq ( prerequisite) to your installation.
above mentioned is the manual process but I want to do it by automation interface.
can any body tell me whether there is automation interface is supported to set the Prerequisites for the project
we can create the object as:
CreateObject("IswiAuto1150.ISWiProject")
but i could not find any method to set prerequisite.
we can set the setup prerequisite file(.prq) for the installation project manually by
1. Go to installation designer Tab
2. under Application data select Redistributables
3. select setup prerequisite from object type to display combobox
4. select the appropriate checkbox to add .prq ( prerequisite) to your installation.
above mentioned is the manual process but I want to do it by automation interface.
can any body tell me whether there is automation interface is supported to set the Prerequisites for the project
we can create the object as:
CreateObject("IswiAuto1150.ISWiProject")
but i could not find any method to set prerequisite.