|
From: Gonzalo D. <gon...@di...> - 2007-09-28 22:56:14
|
I have a strange problem and am lost trying to diagnose it.
I developed a very simple installer for a service. The executable for
the service has options to register and unregister (add and remove) the
service in the service control manager, and for starting and stopping
the service, Therefore, the WXS file simply sets up the directory
hierarchy and then calls a DLL, which then spawns the service executable
with the proper flags. I am using this piece of XML to do this:
<CustomAction Id="CfgWrite" BinaryKey="CfgWrite.dll"
DllEntry="CfgWrite"/>
<CustomAction Id="CleanAll" BinaryKey="CfgWrite.dll"
DllEntry="CleanAll"/>
<InstallExecuteSequence>
<Custom Action="CfgWrite" After="InstallFinalize">NOT
Installed</Custom>
<Custom Action="CleanAll"
After="InstallInitialize">Installed</Custom>
</InstallExecuteSequence>
<Binary Id="CfgWrite.dll" SourceFile="cfgwrite.dll" />
Now, the installation works like a charm, and the service ends up
appearing in the service control manager, and is started. When
uninstalling, the service is eventually stopped and removed from the
service control manager, but only after a two minutes (I measured it)
pause. The msiexec progress windows shows up, it works for about two
seconds, and then stops doing nothing at all for two minutes; then, it
wakes up, stops and deletes the service and finishes.
If I manually stop and remove the service (something that only takes one
or two seconds) before the uninstallation, then this symptom does not
occur: the uninstallation process happens in about five seconds.
I have logging statements in my DLL (the one that invokes the service),
but these do not get executed until after those two minutes have gone
by, so it would seem the pause is not due to stopping / uninstalling the
service; however, if this is the case, then why would stopping the
service by hand get rid of the problem?
Anybody spots anything? Any hints? Thanks in advance and best regards.
--
Gonzalo Diethelm
gon...@di...
|