cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
agarwal_kunal19
Level 3

access INSTALLER_NAME at the time of execution

Hi,
I am trying to pass some arguments to the exe built using IA. These arguments are need for my batch file to run included in the installer.

Now I thought of making the Installer Name with the values, i.e. - Value1_Value2.exe; So that after the user clicks the exe I can get those values from the name of the installer and pass it to the batch file.

But as I searched through the standard variables list there is no variable to get the installer name.

Please let me know how can I get it? If you have any other idea to pass the arguments, please share it.
Labels (1)
0 Kudos
(7) Replies
jerome_IA
Level 9

Hi,

You might find the installer executable full path in variable $EXTRACTOR_EXECUTABLE$ from which you can extract the executable name.

Is it what you need ?

--Jerome
0 Kudos
agarwal_kunal19
Level 3

yes that should work and installer name is all I need, because it will only have the values I need to pass to the batch file. thanks.

And is there any other way, I can pass these values to the installer?
0 Kudos
jerome_IA
Level 9

agarwal.kunal19 wrote:
yes that should work and installer name is all I need, because it will only have the values I need to pass to the batch file. thanks.

And is there any other way, I can pass these values to the installer?


Yes, you can either set some command line arguments with '-D' or create a properties file that you will read later with the installer.
1/ e.g. install.exe -DSOME_VARIABLE=somevalue
2/ For the properties file (that you need to deliver with installer), you have some plugin available (properties file reader).
0 Kudos
agarwal_kunal19
Level 3

thanks for your reply...
Now there are a couple of issues with the methods you specified...

1....I need to deliver web installer...The client won't run through cmd...

2....i can deliver only the Exe file, can't archive the properties file with it...Otherwise it would have been the easiest solution for me...

Actually what I actually need to do, is here, from my server I need to deliver the exe making sure of all the parameters needed to run the batch file...And these parameters have to be restored from the database...The client doesn't have access to them...

It would be really helpful if you can show me a way to achieve this goal..thanks in advance...
0 Kudos
agarwal_kunal19
Level 3

regarding the way you said it can be achieved...I have a small doubt..

To extract the installer name from the path...I have to create a custom code plugin...Am I right...??

Actually I am quite new to using IA...I am going through the user doc to find out how to do this...:(
Thanks in advance...
jerome_IA wrote:
Hi,

You might find the installer executable full path in variable $EXTRACTOR_EXECUTABLE$ from which you can extract the executable name.

Is it what you need ?

--Jerome
0 Kudos
jerome_IA
Level 9

I was not talking about how to extract name from full path, I was just giving you some other way to store your variables somewhere (so not in the installer name).

You have some built-in as well as some down-loadable plugins (from here: http://www.flexerasoftware.com/products/installanywhere/files-utilities.htm) that you can access from action/Plug-Ins tab.

Now if you want to keep your original idea of getting variable from installer executable name, you can get it via plugin called "modify string" which will search&replace through $EXTRACTOR_EXECUTABLE$ so there is no need to write some extra custom code there.
0 Kudos
agarwal_kunal19
Level 3

Hi,
thanks a lot...That's what I needed...:)

jerome_IA wrote:
I was not talking about how to extract name from full path, I was just giving you some other way to store your variables somewhere (so not in the installer name).

You have some built-in as well as some down-loadable plugins (from here: http://www.flexerasoftware.com/products/installanywhere/files-utilities.htm) that you can access from action/Plug-Ins tab.

Now if you want to keep your original idea of getting variable from installer executable name, you can get it via plugin called "modify string" which will search&replace through $EXTRACTOR_EXECUTABLE$ so there is no need to write some extra custom code there.
0 Kudos