Name of Launch file/Dynamic exe updates - Advanced Installer Community
digitalrinaldo
Posts: 88
Joined: Sun Jan 13, 2013 2:51 am

Name of Launch file/Dynamic exe updates

We have two questions about an installer we are using. The installer creates a java installer and we are using the .exe option with the resources in it.

The two questions
  • When a user clicks on the .exe to download and the file is downloaded, and the Installer starts up we need to get the name of the file that was launched -- that is the .exe How do I get the name of the initial .exe on each users desktop. In a bat file %0 is the invoking program, linux follows a similar convention. I need to get the file name and provide it to the java application that advanced installer runs.

    We need to provide each user with different parameters for each install. I would like to include those parameters in the .exe which is downloaded. This .exe is signed. I see you have options for including external files what do you suggest for dynamically creating a .exe with data that is inserted by the web server that is it updates the file each time. I don't want to resign the .exe each time this is too expensive. I have looked at adding to the .exe by using some of the allowed areas for customization as well as appending data.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Name of Launch file/Dynamic exe updates

Hi,
When a user clicks on the .exe to download and the file is downloaded, and the Installer starts up we need to get the name of the file that was launched -- that is the .exe How do I get the name of the initial .exe on each users desktop. In a bat file %0 is the invoking program, linux follows a similar convention. I need to get the file name and provide it to the java application that advanced installer runs.
In order to get the EXE file name you can use the [AI_SETUPEXEPATH] property which contains the path to the EXE file, and create a simple custom action to parse it and get the EXE name.
We need to provide each user with different parameters for each install. I would like to include those parameters in the .exe which is downloaded. This .exe is signed. I see you have options for including external files what do you suggest for dynamically creating a .exe with data that is inserted by the web server that is it updates the file each time. I don't want to resign the .exe each time this is too expensive. I have looked at adding to the .exe by using some of the allowed areas for customization as well as appending data.
If the number of your clients is not too large and you know them and if your configuration files are also not too large, you can add all the files for all the clients in the installation package, create a separate feature for every client then create a dialog where the clients can select a radio button with the name of their company and based on this the corresponding feature is installed with the corresponding files.

Please keep in mind that any modification done to the EXE setup spoils the digital signature and the package must be built again, so I think that adding files to the EXE would not be a good solution.

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
digitalrinaldo
Posts: 88
Joined: Sun Jan 13, 2013 2:51 am

Re: Name of Launch file/Dynamic exe updates

I modified my application to use a custom argument. It would be useful to have a way of adding custom configuration data to a .exe. There are fields for that in an exe that are not included as part of the signature. It is expensive to resign an executable each time. Thanks for the help. I was able to perform a work around.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Name of Launch file/Dynamic exe updates

You're welcome. I'm glad you got this working.

Also, we will consider your suggestion and we will see what we can do in a future version of Advanced Installer. Thank you for it.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”