Wix-users is the correct place to ask this…
Why don’t you just use the ServiceInstall and ServiceControl elements? That’s
what they are for.
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gonzalo Diethelm
Sent: Friday, September 28, 2007 15:55
To: [EMAIL PROTECTED]
Subject: [WiX-commits] Wix 2 and service
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
[EMAIL PROTECTED]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users