Page 1 of 2
Create scripts programmatically
Posted: Fri Jun 22, 2012 3:54 am
by Ton_B
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.
Re: Create scripts programmatically
Posted: Fri Jun 22, 2012 4:50 am
by FrancescoT
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
Re: Create scripts programmatically
Posted: Fri Jun 22, 2012 4:59 am
by Ton_B
hmm..
we just purchased the studio version

Re: Create scripts programmatically
Posted: Fri Jun 22, 2012 7:37 am
by Ton_B
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
Re: Create scripts programmatically
Posted: Fri Jun 22, 2012 7:58 am
by FrancescoT
Dear Ton,
write an email to
[email protected].
Of course they will be able to help you.
Regards
Re: Create scripts programmatically
Posted: Tue Jun 26, 2012 5:51 am
by Ton_B
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.
Re: Create scripts programmatically
Posted: Tue Jun 26, 2012 9:31 am
by FrancescoT
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
Re: Create scripts programmatically
Posted: Wed Jun 27, 2012 12:34 am
by Ton_B
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
Do you have any idea when we can expect this new C# class ??? and on how we can get our hands on it
probably worth waiting for
Regards
Re: Create scripts programmatically
Posted: Wed Jun 27, 2012 8:15 am
by FrancescoT
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
Re: Create scripts programmatically
Posted: Wed Jun 27, 2012 8:26 am
by Ton_B
Ok,
Any chance I can get a notification when this incredibly fantastic new feature

is available?
I'm going to need it pretty soon !
Thanx
Ton
Re: Create scripts programmatically
Posted: Wed Jun 27, 2012 8:45 am
by FrancescoT
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.
Regards
Re: Create scripts programmatically
Posted: Mon Jul 02, 2012 12:54 am
by Ton_B
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
Re: Create scripts programmatically
Posted: Mon Jul 02, 2012 9:31 am
by FrancescoT
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
Re: Create scripts programmatically
Posted: Mon Oct 29, 2012 3:13 am
by Ton_B
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
Re: Create scripts programmatically
Posted: Mon Oct 29, 2012 4:28 am
by FrancescoT
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