I have a service that won't start when the installer tries to start it, because
the installer has at that time not yet unpacked and copied to the
destination media all the files that the service depends on to run. I have
narrowed it down to a particular type of file that has not been unpacked
before services are started.
Here are details, generalized a bit. I'm using AI v. 4.9.2.
I have a service with executable file A that depends on DLL file B.
My installer files include both A and B files.
File B is a .NET assembly. I have created an entry under Project Details /
Assemblies in the installer definition that says to registered file B with the
Global Assembly Cache (GAC).
I defined a service in the installer based on A, and told the installer to
start the service by defining under Services a control operation with Start
checked.
When I try an installation, service A fails to start when the installer tries to
start it. By careful inspection, I have discovered this is the sequence of
actions taken by the installer:
1. Unpack file A and all other files *except for* any file that is an
assembly set to be registered with the GAC.
2. Try to start service based on A
3. Unpack file B along with any other files to be registered with GAC
(presumably...actually I have never yet made it to this stage, but
if I tell the installer not to start the service (no step 2), then
I eventually do make it here.)
The dependent DLL file B wasn't unpacked (nor were several other files
that I specified to be registered in the gAC) when the installer tried to start
my service A.
So is this an AI bug, or a deficiency in the MSI engine? Is there any
workaround, I am wondering?
---
UPDATE: I tried getting my file B regsitered in the GAC by *Not* creating
an entry for it under Project Details / Assemblies, but instead by checking
the Registration (register .NET assembly for COM) option under Properties
for B's entry under Project Definition / Files and Folders.
I see the following changed behavior: At the time the installer tries to
start service A, this time file B *has* been unpacked from the installer,
BUT it has not yet at this point in time been registered with the GAC. So
my service still fails to start...