Loading
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

  • J Stechnij (Flexera Software)

    You can add components to an InstallScript project with the ISWiProject.AddComponent method. Unfortunately, it is not currently possible to add dynamic file links to new components or manipulate existing links when working with an InstallScript project in the automation interface (I've submitted enhancement request IOC-000082900 to request this limitation be removed).

     

    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();

     

    Expand Post
  • I was afraid of that. The components must have Dynamic links.

     

    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
    Expand Post
  • 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.
    Expand Post
  • please do reply for this

     

    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.
    Expand Post

Loading
Creating Components using Automation in C#