Create scripts programmatically

Got a problem you cannot solve? Try here.

Create scripts programmatically

Postby Ton_B » Fri Jun 22, 2012 3:54 am

Our setup is, at some points, a bit complex.

It installs a lot of executables and dll's from different locations.

For example, my source directory contains:
    C:\Vault\Sources\Programs\Program_A\Program_A.exe
    C:\Vault\Sources\Programs\Program_B\Program_B.exe
    C:\Vault\Sources\Programs\Program_C\Program_C.exe

You simply manually add these items with IA with Install Files C:\Vault\Sources\Programs\Program_A\Program_A.exe to $TARGETDIR$\Prog_A

But, when there is an new program developt (eg:) Program_D
I must add the lineInstall Files manually.

I would really like to add changes as this programmatically (using any kind of programming like C#)
And, when done, push de building of the setup trough our buildserver.

So, the main question is:
How can I change te IA script programatticly ?

Thanx

Ton.
Ton Blokhuizen
Tooling Engineer
BMA BV - Netherlands
[i]BMA: leading the way in obstetrical data management
http://www.bma-mosos.nl[/i]
Ton_B
 
Posts: 109
Joined: Wed Nov 16, 2005 8:34 am
Location: Netherlands

Re: Create scripts programmatically

Postby FrancescoT » Fri Jun 22, 2012 4:50 am

Dear Ton,

InstallAware ships with automation interface that can be used to programmatically emit and build complete setup projects. The automation interface is available as both a standard Win32 DLL, callable from any Windows application, and as a COM object, for use in ASP scripts on a web server.

Automation interface is avilable with InstallAware Admin Studio edition.

Currently I can not anticipate much more but ... there are interesting news aroud the corner ... as the possibilities to have access to Automation using a C# class.

Regards
Francesco Toscano
InstallAware Software Support

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
FrancescoT
Site Admin
 
Posts: 1892
Joined: Sun Aug 22, 2010 4:28 am

Re: Create scripts programmatically

Postby Ton_B » Fri Jun 22, 2012 4:59 am

hmm..

we just purchased the studio version :?
Ton Blokhuizen
Tooling Engineer
BMA BV - Netherlands
[i]BMA: leading the way in obstetrical data management
http://www.bma-mosos.nl[/i]
Ton_B
 
Posts: 109
Joined: Wed Nov 16, 2005 8:34 am
Location: Netherlands

Re: Create scripts programmatically

Postby Ton_B » Fri Jun 22, 2012 7:37 am

We purchased an upgrade for IA just 2 weeks ago.
And, no we would like to get the Studio-Admin license.

How can we get an upgrade for the current version of IA ?
The webshop does not have an option to upgrade the latest version?

should i make an post in the sales-section of the forum?

Thanx
Ton Blokhuizen
Tooling Engineer
BMA BV - Netherlands
[i]BMA: leading the way in obstetrical data management
http://www.bma-mosos.nl[/i]
Ton_B
 
Posts: 109
Joined: Wed Nov 16, 2005 8:34 am
Location: Netherlands

Re: Create scripts programmatically

Postby FrancescoT » Fri Jun 22, 2012 7:58 am

Dear Ton,

write an email to sales@installaware.com.

Of course they will be able to help you.

Regards
Francesco Toscano
InstallAware Software Support

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
FrancescoT
Site Admin
 
Posts: 1892
Joined: Sun Aug 22, 2010 4:28 am

Re: Create scripts programmatically

Postby Ton_B » Tue Jun 26, 2012 5:51 am

Dear Francesco,

I've found how to get started with the automated setup.

The example (Delphi) script included with the IA setup, includes some basic elements.
Like: Comment, installing a file, if-else-end etc.

It also includes the way to include prerequisitist.

But at the moment I'm missing two important things:

How Can I create a new scriptfile and add it to the project?
I think I know how to call the scriptfile, prbably by calling: miaAddCommand('Include Script', 'ScriptName','C:\scripts\ScriptName.mia') ????

Also I'm missing a example for createing a FileBag.
Can I create this line using the following command: miaAddCommand('Define File Bag', 'File to include',includesubfolders,excludewildcards,variabletoreceive) ????


Eventually I'm planning to create a .NET component/object where you can select all available features. I will call this object simply InstallAware
Example: C# code

Code: Select all
InstallAware mia = new InstallAware();

mia.SetVariable("VariableName",defaultvalue);
mia.AddComment("CommentLine here");
mia.InstallFile(miaDESTINATIONFOLDER+@"\NewFolder","c:\filestoinstall\testfile.exe");
mia.InstallFile(miaWINSYSDIR,"c:\filestoinstall\testfile.dll",True,False);


as you can see, i'm planning to make several functions for one action.
A basic function for installing a file, by just adding the destination folder, using a enumerated field containting the predefined variables of IA and the sourcefile.

But, before I can do this, I need to fugure out how the currnt miaAddCommand is working.
What I mean is how can I determan wich optians and variabables has to be passed to the different commands?
Is it "simply" miaAddCommand(FUNCTIONNAME) followed by all of the parameters displayed in the dialog when using the IA interface ?

Or is there some kind of (technical) documentation available

Hope you can help.
Ton Blokhuizen
Tooling Engineer
BMA BV - Netherlands
[i]BMA: leading the way in obstetrical data management
http://www.bma-mosos.nl[/i]
Ton_B
 
Posts: 109
Joined: Wed Nov 16, 2005 8:34 am
Location: Netherlands

Re: Create scripts programmatically

Postby FrancescoT » Tue Jun 26, 2012 9:31 am

Dear Ton,


How Can I create a new scriptfile and add it to the project?

To specify the main script used by the project use: miaSetScriptFile
To include any additional script use: miaAddIncludeFile

Then to call the additional script from the main script use: miaAddCommand("Include Script", "ScriptName");

What I mean is how can I determan wich optians and variabables has to be passed to the different commands?
Is it "simply" miaAddCommand(FUNCTIONNAME) followed by all of the parameters displayed in the dialog when using the IA interface ?

Yes, use the same as you have with AI IDE.

For Example to add a MessageBox Call:
Code: Select all
AddCommand("MessageBox", "\"$TITLE$ Setup\"," +
                                              "\"Windows Installer 2.0 installed. Your computer needs to be restarted for the changes to take effect.$NEWLINE$$NEWLINE$Please reboot your computer and restart setup.\",\"" +
                                                "\"2\",\"1\",\"\"");


Anyway as I told you previously, very soon will be possible to have a C# Automation Class for it.

Regards
Francesco Toscano
InstallAware Software Support

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
FrancescoT
Site Admin
 
Posts: 1892
Joined: Sun Aug 22, 2010 4:28 am

Re: Create scripts programmatically

Postby Ton_B » Wed Jun 27, 2012 12:34 am

Dear Francesco

I've read your previous post where you are saying:
Currently I can not anticipate much more but ... there are interesting news aroud the corner ... as the possibilities to have access to Automation using a C# class


But thought it was a bit mysterious :D

Do you have any idea when we can expect this new C# class ??? and on how we can get our hands on it :D
probably worth waiting for :P

Regards
Ton Blokhuizen
Tooling Engineer
BMA BV - Netherlands
[i]BMA: leading the way in obstetrical data management
http://www.bma-mosos.nl[/i]
Ton_B
 
Posts: 109
Joined: Wed Nov 16, 2005 8:34 am
Location: Netherlands

Re: Create scripts programmatically

Postby FrancescoT » Wed Jun 27, 2012 8:15 am

Dear Ton,

believe me, I don't want to be mysterious ... it is only because actually I haven't any further information about (as release time and technical details).

... yes, worth waiting for and very probably ... not so much.

Regards
Francesco Toscano
InstallAware Software Support

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
FrancescoT
Site Admin
 
Posts: 1892
Joined: Sun Aug 22, 2010 4:28 am

Re: Create scripts programmatically

Postby Ton_B » Wed Jun 27, 2012 8:26 am

Ok,

Any chance I can get a notification when this incredibly fantastic new feature :D is available?
I'm going to need it pretty soon !

Thanx

Ton
Ton Blokhuizen
Tooling Engineer
BMA BV - Netherlands
[i]BMA: leading the way in obstetrical data management
http://www.bma-mosos.nl[/i]
Ton_B
 
Posts: 109
Joined: Wed Nov 16, 2005 8:34 am
Location: Netherlands

Re: Create scripts programmatically

Postby FrancescoT » Wed Jun 27, 2012 8:45 am

Dear Ton,

Of course!

as usual any news about enhancements and new IA features will be widely notificated, using forum and/or via email to registered users.

So don't worry. 8)

Regards
Francesco Toscano
InstallAware Software Support

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
FrancescoT
Site Admin
 
Posts: 1892
Joined: Sun Aug 22, 2010 4:28 am

Re: Create scripts programmatically

Postby Ton_B » Mon Jul 02, 2012 12:54 am

I cannot figure out how I can become a registered user ?
I know we've purchased IA using the companies info mail account, but do not get mails from that.

I do get mails from your sales department, just this morning I received one regarding a 4th of July action.

Do you think the mail regarding the "C# class feature" will be send to my mailaddress ?
Or can I submit my mailaddress to some newsletter on the IA website?

Thanx

Ton
Ton Blokhuizen
Tooling Engineer
BMA BV - Netherlands
[i]BMA: leading the way in obstetrical data management
http://www.bma-mosos.nl[/i]
Ton_B
 
Posts: 109
Joined: Wed Nov 16, 2005 8:34 am
Location: Netherlands

Re: Create scripts programmatically

Postby FrancescoT » Mon Jul 02, 2012 9:31 am

Dear Ton,

Any news about the InstallAware product releases will be posted on forum and annunced to registered users via email (as 4th of July action email you received ... so you are registered as user).

Actually I really do not know in which form it will be available ( I suppose probably as part of next IA release ... but I'm just supposing), of course you will not miss it.

Regards
Francesco
Francesco Toscano
InstallAware Software Support

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
FrancescoT
Site Admin
 
Posts: 1892
Joined: Sun Aug 22, 2010 4:28 am

Re: Create scripts programmatically

Postby Ton_B » Mon Oct 29, 2012 3:13 am

Hello Francesco,

I still did not receive a e-mail regarding the C# Automation class.
Today i received an e-mail regarding the new version of IA (version 15) but I cannot see if the c# class is part of that update.

The e-mail I received, sais that IA 15 will release after our software mainenance and technology guarentee have expired.
It feels that we've purshuased our upgrade a bit to soon, and now "have to pay for it"
Doesn't feel good .....


I'm not in the position to make the descision and, if I suggest we should upgrade it will take some tom until i get approval to do so.
So this e-mail comes a little late, because IE 14 will be shipped this friday!

Due to full schedule of my work I am not able to take any action until next monday.
Any suggestions what to do?

Thank you.

Ton
Ton Blokhuizen
Tooling Engineer
BMA BV - Netherlands
[i]BMA: leading the way in obstetrical data management
http://www.bma-mosos.nl[/i]
Ton_B
 
Posts: 109
Joined: Wed Nov 16, 2005 8:34 am
Location: Netherlands

Re: Create scripts programmatically

Postby FrancescoT » Mon Oct 29, 2012 4:28 am

Dear Ton,

As you received our last email regarding the imminent availability of the new InstallAware version 15, you should have received as well (in august 2012) that one about InstallAware NX availability (the version currently distributed).

The C# automation class has been made available with InstallAware NX and as part of the "studio Admin" edition.

For a complete list of the features available with IA NX, you can refer to the following link:
http://www.installaware.com/blog/?p=119

By the way, if you are already using InstallAware NX, have a look at "what's new" or search for "Automation" in IA documentation.

Any suggestions what to do?

Which is the IA version you are actually using?

Regards
Francesco Toscano
InstallAware Software Support

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
FrancescoT
Site Admin
 
Posts: 1892
Joined: Sun Aug 22, 2010 4:28 am

Next

Return to Technical Support

Who is online

Users browsing this forum: bokkie and 8 guests