Bootstrapper EXE ini file - Advanced Installer Community
derfsplat
Posts: 19
Joined: Mon Jun 05, 2006 10:28 pm

Bootstrapper EXE ini file

I have written a custom updater application that wraps Windows Installer using the AI EXE with all installer files packaged in the EXE. (I need a custom updater because I have a client / server application - so I have to pull down my server portion to the server, update that, then publish the client portion for workstations to pull down and update themselves).

Everything works fine but now I need to expand the functionality to support new prerequisites in our application. In compiling the AIP project, I can see the ini file that's created for the bootstrapper EXE and, indeed, if i choose to leave the files outside the EXE I can also see the ini file. However, if I choose to package all the files inside the EXE, when I call /extract on the resulting bootstrapper exe, the ini file is not extracted as I would expect. I need some way to access this file so that I can read prerequisite information out of the installer.

I have 2 questions-
1- Would it be possible to add the extraction of the boostrapper ini file (containing the relevant prerequisite information) to the list of files extracted with the /extract command?
2- In lieu of this, can you point me to an API or a standard that you are using to pack the files in the EXE so that I can read them myself? I thought it might be something like http://msdn.microsoft.com/en-us/library ... 85%29.aspx (Compound files) but it does not appear you are using this storage type. Are you using another public API for packing the EXE?

Thanks in advance!
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Bootstrapper EXE ini file

Hello,

I am afraid we do not encourage the extraction of the ini file, thus we will not support this feature. Also, we are not using any standard API for the packing.
Everything works fine but now I need to expand the functionality to support new prerequisites in our application.
Perhaps you are misusing the prerequisites functionality. Prerequisites are intended to provide support for your application to run properly not the other way around. Your application should not concern itself about prerequisites, that's the installer's job. Or perhaps I am misunderstanding your statement in which case I would ask for more information as to why you need to extract the INI.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
derfsplat
Posts: 19
Joined: Mon Jun 05, 2006 10:28 pm

Re: Bootstrapper EXE ini file

Here's the issue...

We have a client / server application. We have a server installer, call it ServerInstall.exe, and a client install, call it ClientInstall.exe.

The application that performs the updates is included in the installer (EPSUpdater) but it is not the application itself. EPSUpdater polls a web server and checks for updates (I originally developed this before your updater support was mature and, beyond that, your updater doesn't support our scenario of having a server AND client component- nor should it, I think we're kind of a unique case). I need to be able to update the server component of our software with the ServerInstaller.exe, and then download and make available the ClientInstaller.exe to said server so that workstations can then pull the ClientInstaller.exe to update themselves. It works like this:

EPS Update Server hosts update
Distributed end-user server discovers update by running EPSUpdater which then downloads the server and client component
Server updates itself using EPSUpdater
EPSUpdater then makes available - on the server- the client component that is now required to update the workstations.

This is why I wrote a custom updater.

I need access to the INI file simply to read it. I can get the INI file by building the installation package with the option "leave files outside" (of the exe) selected, but this won't work for our scenario as we need the EXE, cab, msi, and more custom code that executes as part of initial server prerequisite list, packed into the bootstrapper EXE otherwise we have 20+ files loose in one directory and this gets hard to manage in terms of downloads and distribution (which is why have the option to include the files in the EXE).

We are using the prerequisites correctly. You have a WONDERFUL product- orders of magnitude more user friendly for the feature set than most other installation builders. The prerequisites work great the first time the application is installed. The issue arises when I need to update it. The requirements for the application have changed, specifically, we are going to require (with our next version) the .net 3.5 framework, where previously we only required the 2.0 framework. I know I can add .net 3.5 as a pre-requisite to the installation package- and I will, but that only works during the initial install and not during the update.

I hope I have explained correctly what's going on. I need access to the INI file so that our custom updater application can check during an update to see if there are prerequisites that are not yet installed. I have access to this INI file with the option to leave files outside, but because of another application we run as a prerequisite, this option requires that I leave 20+ files "loose" outside the EXE. I asked about the extract command adding the INI file because the only difference in the set of files left outside the EXE at build time with "leave files outside" option checked and the set of files extracted from a packed EXE with the /extract command is the INI file, which seems incorrect. The extract command otherwise recreates the "unpacked" build of the EXE when it's run, but it leaves out the INI file.

I hope I've explained why we had to write a custom updater for our client / server application. I think this is probably the first time someone has asked for this type of feature, and as an ISV I understand the reluctance do "customer specific" development, however the point I was hoping to make is that the /extract command doesn't seem to work as expected. I would expect that /extract would leave me with the same set of files as if I had selected "leave files outside" when building the EXE.

Is there anyway this might be changed to include the INI file?
Does the bootstrapper extract the INI file to a temp directory that I could lookup?
Is there anyway to read the INI file out of the EXE?

Any help would be greatly appreciated. Thanks!
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Bootstrapper EXE ini file

Hello,

Thank you for the detailed explanation.
I know I can add .net 3.5 as a pre-requisite to the installation package- and I will, but that only works during the initial install and not during the update.
Why do you say it will not work during an update?

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
derfsplat
Posts: 19
Joined: Mon Jun 05, 2006 10:28 pm

Re: Bootstrapper EXE ini file

I have existing installations out deployed already (over 1000 of them). I was hoping to be able to read the INI file so that when current deployed installations go to update themselves (with our custom updater, not AI's, because of the server/client deployment scenario), they could read the INI file to verify that all current prerequisites for the next version of the application are present.

It won't work for updates of currently installed versions of the application. Let's say we have Server X installed in January with the latest version of the software, 1.0. Version 1.0 doesn't require .net 3.5, but version 1.5 does. Version 1.5 is released tomorrow. Version 1.0 of the software finds the 1.5 update, pulls it down, extracts it, and then executes the latest version of our custom updater. At that point, I would like to be able to check the requirements (the prerequisites) for the 1.5 version of the software to make sure that the installation that was performed in January still meets all the requirements. If it does not, I'll download or execute included installers as necessary.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Bootstrapper EXE ini file

Hello,
At that point, I would like to be able to check the requirements (the prerequisites) for the 1.5 version of the software to make sure that the installation that was performed in January still meets all the requirements.
But that check during the update is already done by the bootstrapper when it starts. It uses the conditions on the "Install Conditions" tab of the prerequisite's property page to determine whether the prerequisite is already installed or not. Just make sure your conditions are properly set so it can detect whether a prerequisite is installed or not and install it or not accordingly.

Let me know if I understood this correctly.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”