re-use of variables

Got a problem you cannot solve? Try here.
Ton_B
Posts: 115
Joined: Wed Nov 16, 2005 8:34 am
Location: Netherlands
Contact:

re-use of variables

Postby Ton_B » Tue Jan 17, 2006 3:46 pm

In the visual mode of IA, you can add the manufacturer in the project properties tab.
In the summary information tab, you can add the name of the author.
In the Add-remove tab, you can add the Publisher name

In my situation all of these items are the same.
Also the product name in the project propery tab and the Title in the summary information tab are the same.

To prevent making mistaches, I was looking for the variables of these items, so I could fill them using script instead of the "Visual mode".
Unfortuanally I could not find the varables wich "carry" these values.

Looking in the help-file I found a "couple" pre-defined variables:
$TITLE$ = productname
$COMPANY$ = publisher name

I could not find the variables: $AUTHOR$, $PRODUCTNAME$ or $PUBLISHER$

I would really like to build my project using only script!!
is this possible ?

Ton.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Tue Jan 17, 2006 3:52 pm

Hi Ton!

This is a great question. The properties set in the Project Options dialog are not settable from the setup script. They contain settings such as the setup author, manufacturer name, compression strength, and so on.

The pre-defined variables page in the help index describes which variables in the script carry these values. For example, $TITLE$ is initialized from this dialog. But there won't be a script setting for everything in the dialog...such as compression strength, for instance.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

Ton_B
Posts: 115
Joined: Wed Nov 16, 2005 8:34 am
Location: Netherlands
Contact:

Postby Ton_B » Tue Jan 17, 2006 4:06 pm

Hi Michael

Thanx for your quick reply !

So if I understand correctly not all of the variables can be set in script mode.
But can I read these variables so I could use them in my script?
for example to write it to a textfile: like this:

Code: Select all

 Write into Text File $TARGETDIR$\\file.txt AUTHOR = $????$

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Tue Jan 17, 2006 4:20 pm

No, actually you can set variables freely in the script; the only problem is, there isn't a script variable for every setting in the Project Options dialog. Unfortunately author is one of them.

If you want to work around this...just specify a compiler variable in the Project Options dialog for the author field. And then in your script you can access the same compiler variable and write it to the text file!
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

Ton_B
Posts: 115
Joined: Wed Nov 16, 2005 8:34 am
Location: Netherlands
Contact:

Postby Ton_B » Tue Jan 17, 2006 4:42 pm

Ok, so I just simply set some compiler variables.

I then can read these variables anywhere in the script for further use.
But if I create these variables, can I leave the textboxes in the options dialog box blank?
All I have to do next is write script for adding registery-keys for the settings used by "Add-Remove programs" etc.

Or is it not possible to leave these items blank?

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Tue Jan 17, 2006 4:52 pm

No, you don't want to leave them blank - that would create problems. Fill in the compiler variables there as well! They will be resolved as long as you are using version 5.01 of InstallAware (issued last week).
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

Ton_B
Posts: 115
Joined: Wed Nov 16, 2005 8:34 am
Location: Netherlands
Contact:

Postby Ton_B » Wed Jan 18, 2006 3:22 am

hmm.. So I still have to fill all of the texboxes.

I have another question then.

Textboxed filled out in the options dialog, will be used by IA.
eg. "Author" will be used for the helptext shown in windows explorer.
"Publisher" will be used for the helptext shown in the add-remove programs list.

What I am interested in is: IA uses the textboxes of the options dialog to fill out reg-keys etc. These actions are not visible in the script, but are really beïng processed (build in processes).

Is it possible to overwrite these settings, by using the compiler variables?
so, Can you provide a list of "hidden" actions preformed by IA, so I completly know what actions will be taken by IA and I can decide to overwrite them?
Therefore I really want to know wich registry-keys (and other settings,files etc.) are set during install.
I only could find a couple of regestry settings:

Code: Select all

HKCU\\Software\\Microsoft\\Installer\\Product\\[PRODUCTCODE]
HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\[TITLE]
HKU\\[PRODUCTCODE]\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\[TITLE]


Thanx.

Ton.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Wed Jan 18, 2006 9:48 am

These are great questions!

I need to emphasize that nothing happens behind the scenes in InstallAware. Everything that happens is spelled out in your setup script. There are of course some build settings which would not be appropriate to store in the setup script - such as the compression strength. These are stored as part of the Project Options dialog, and stored in a seperate .MPR file (recall the script is saved inside a .MIA file).

Now, when you call Apply Install, and this happens in the setup script, InstallAware does create a registry key for your product, so that it can be uninstalled and/or maintained. Since every setup program needs this, making this step manual would be more of a burden than a convenience. That is why no explicit commands are present in the setup script to write into the registry keys for the Control Panel Add-Remove Programs applet!

The setup engine might also be writing to some other places for its internals to work properly, I do not have a full list at this time. Its easy to find out though. Just build an empty InstallAware setup, run it inside a clean VMware/Virtual PC (or even real) machine, and use PackageAware to monitor the changes made to the system!
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

Ton_B
Posts: 115
Joined: Wed Nov 16, 2005 8:34 am
Location: Netherlands
Contact:

Postby Ton_B » Wed Jan 18, 2006 10:14 am

Package Aware, of course. :)

I've never thought about it... I was just focussing on the creation of the script!

I will test it right away!

Thanx for your 'reminder'

Ton.


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 114 guests