Ok, I am recanting from my past sins and turning to ServiceInstall and
ServiceControl and away from my CustomActions to install / uninstall my
service. However, I get the exact same symptom as before: when
uninstalling the service, there is a long pause. Since it's been some
time, allow me to restate the situation for your clarity.
My Wix 2.0 installer is running as administrator (using Condition
Privileged) and installing a Windows service. Here is the relevant piece
from the Wix file:
<File Id="bgserver.exe" Name="bgserver.exe" KeyPath="yes" DiskId="1"
Source="bgserver.exe" Vital="yes"/>
<ServiceInstall Id='xlnserver.exe' Description='XLNserver'
DisplayName='XLNserver' ErrorControl='normal' Interactive='no'
Name='XLNserver' Start='auto' Type='ownProcess' Vital='yes'/>
<ServiceControl Id='xlnserver.exe' Name='XLNserver' Remove='uninstall'
Start='install' Stop='both' Wait='yes'/>
Installation works fine and the service is started. When I run the
uninstallation and the service is not running, it also works fine and
the service is uninstalled. But when I try to uninstall and the service
is running, the uninstaller hangs for about two minutes and then
finishes (properly uninstalling the service after the long pause). The
uninstallation log shows the following (with some manual translations
from Spanish to English done by me):
Action was initiated at 16:15:29: InstallValidate.
MSI (s) (60:DC) [16:15:29:843]: PROPERTY CHANGE: Modifying
CostingComplete property. Its current value is '0'. Its new value: '1'.
MSI (s) (60:DC) [16:15:29:843]: Note: 1: 2205 2: 3: BindImage
MSI (s) (60:DC) [16:15:29:843]: Note: 1: 2205 2: 3: ProgId
MSI (s) (60:DC) [16:15:29:843]: Note: 1: 2205 2: 3: PublishComponent
MSI (s) (60:DC) [16:15:29:843]: Note: 1: 2205 2: 3: SelfReg
MSI (s) (60:DC) [16:15:29:843]: Note: 1: 2205 2: 3: Extension
MSI (s) (60:DC) [16:15:29:843]: Note: 1: 2205 2: 3: Font
MSI (s) (60:DC) [16:15:29:843]: Note: 1: 2205 2: 3: Shortcut
MSI (s) (60:DC) [16:15:29:843]: Note: 1: 2205 2: 3: Class
MSI (s) (60:DC) [16:15:29:843]: Note: 1: 2727 2:
MSI (s) (60:DC) [16:17:41:984]: Note: 1: 2205 2: 3: Error
MSI (s) (60:DC) [16:17:41:984]: Note: 1: 2228 2: 3: Error 4: SELECT
`Message` FROM `Error` WHERE `Error` = 1607
MSI (s) (60:DC) [16:17:42:000]: Note: 1: 2205 2: 3: Error
MSI (s) (60:DC) [16:17:42:000]: Note: 1: 2228 2: 3: Error 4: SELECT
`Message` FROM `Error` WHERE `Error` = 1603
Information 1603. The file E:\Program Files\Excelente\XLNsrvr\bin
\bgutil.dll is in user by the following process: Name: bgserver, Id.:
500, Windows title: '(not determined yet)'. Close this application and
try again.
... [several identical messages for other DLLs and EXEs]
MSI (s) (60:DC) [16:17:42:015]: Note: 1: 2727 2:
MSI (c) (E4:04) [16:17:42:015]: File In Use: -bgserver- Window could not
be found. Process ID: 500
MSI (c) (E4:04) [16:17:42:015]: File In Use: -OProtSvc- Window could not
be found. Process ID: 264
MSI (c) (E4:04) [16:17:42:015]: No window with title could be found for
FilesInUse
The error message appears for two processes: my service and OProtSvc
(which is a service provided by Intel to manage their WiFi card). My
questions are:
1. Am I setting the ServiceInstall and ServiceControl elements properly?
2. Should I expect the uninstaller to gracefully stop my service without
this long pause? The service stops very quickly (it takes not more than
1 or 2 seconds to stop), and if I stop it manually there is no pause
during uninstallation.
3. The reason OProtSvc appears as using my files is this: I install the
OpenSSL DLLs into a private directory; among them, libeay32.dll. The
Intel OProtSvc service does use this library, but of course it CANNOT be
using it from my folder, which is private (this same DLL appears in
"/Program Files/Intel/Wireless/Bin/libeay32.dll" and
"/WINDOWS/system32/libeay32.dll"). So it looks like there is a match
done on the DLL name regardless of its path... Would this be a bug?
4. If this long pause constitutes proper and expected behaviour, what is
the recommendation for me? Should I somehow pop up a window telling the
user to stop the service before uninstalling? But if this is the case,
why have a "stop" command for ServiceControl if it will cause this much
grief?
Thanks for any feedback and best regards.
On Tue, 2007-10-02 at 22:51 -0700, Bob Arnson wrote:
> Gonzalo Diethelm wrote:
>
> > I guess that's arguable. I already had to provide all those details
> > (service name, startup information, etc.) in the EXE itself, in
> > order to support the /install, /remove, /start and /stop switches.
> > Why would I want to repeat that in the installer, instead of just
> > calling the EXE?
>
>
> Because the .exe doesn't provide the functionality you get "for free"
> from MSI when you duplicate the data in the .msi package. Do you
> handle install, uninstall, repair, modify, upgrades, and patching?
> It's possible, of course, but at a cost far higher than duplicating
> the data. And if data duplication is your biggest concern, you can
> single-source it by preprocessing the data, either into a header in
> your code or an include file in your WiX authoring (one of the
> advantages of XML).
>
>
> --
> sig://boB
> http://joyofsetup.com/
--
Gonzalo Diethelm
[EMAIL PROTECTED]
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users