I'm installing some Windows Services using WIX. For that I've populated the
ServiceControl and ServiceInstall tables.
When installing an upgrade, the installer stops the services, replaces the
files and restarts the service. But since InstallValidate runs before
StopServices, the FileInUse table is populated with all the files the
services are using. Upon finishing the installation, the installer wants to
do a reboot.
How can I solve this? Should I stop the services from my setup bootstrapper
before calling the MSI?
Kind regards,
Henning Krause
However, if the locking process is not a service, then unless you want
to write custom actions to handle shutting down the process, you may
need to just take the hit.
You need to look through the logs to identify exactly what process is
locking your files when the installer tries to overwrite them. Just
look for the string 'in use' in the logs.
If the files are locked by a service running on the local machine,
then you need to add that service to the list of services being
controlled, by means of records in the ServiceControl table. Bear in
mind that shutting down a service may shut down dependent services,
but Windows Instaler will not restart the stopped dependencies unless
these are explicitly written to the ServiceControl table. In this
situation it might be easier to restart the machine and let the
service control manager sort out the start order for you :@); the
alternative involves enumerating all service dependencies and
dynamically authoring them into the table.
the files are locked by the services I wish to upgrade.
The ServiceControl Table hast all three services listed with the Event
Column = 163 and Wait = 1
According to MSDN
(http://msdn.microsoft.com/en-us/library/aa371634(VS.85).aspx), 163 means:
1 = Starts the service during the StartServices action (install).
2 = Stops the service during the StopServices action (install).
32 = Stops the service during the StopServices action (uninstall).
128= Deletes the service during the DeleteServices action (uninstall).
I'm performing a major upgrade here.
Am I missing something?
Kind regards,
Henning Krause
"Stephen Connolly" <sm_s...@hotmail.com> wrote in message
news:2315d9a8-83fb-4dd8...@56g2000hsm.googlegroups.com...
"Henning Krause [MVP - Exchange]" <newsgrou...@this.infinitec.de>
wrote in message news:OI8tHqLx...@TK2MSFTNGP02.phx.gbl...
so my only option here would be manually stopping the relevant services by
my setup bootstrapper?
Kind regards,
Henning Krause
"Phil Wilson" <pdjw...@nospam.cox.net> wrote in message
news:ObuqfbMx...@TK2MSFTNGP02.phx.gbl...
--
Phil Wilson
Definitive Guide to Windows Installer
http://www.apress.com/book/view/1590592972
"Henning Krause [MVP - Exchange]" <newsgrou...@this.infinitec.de>
wrote in message news:ehUfcjNx...@TK2MSFTNGP02.phx.gbl...
The FilesInUse dialog is a bit buggy IMO, as it appears to use some
kind of heuristic to guess whether a file is locked rather than
checking that it is actually locked by that process. We've had a
couple of cases where FilesInUse reports a file is locked by one
process when it is actually locked by another.
--
Phil Wilson
Definitive Guide to Windows Installer
http://www.apress.com/book/view/1590592972
"Stephen Connolly" <sm_s...@hotmail.com> wrote in message
news:bc5694c7-6df4-4765...@d77g2000hsb.googlegroups.com...
that seems to be the case - the issue does no longer happen reproducible.
Thanks for all your help.
Kind regards,
Henning Krause
"Phil Wilson" <phil....@wonderware.something.com> wrote in message
news:O0kFciZx...@TK2MSFTNGP04.phx.gbl...
On Mon, 2 Jun 2008 16:11:14 +0200, "Henning Krause [MVP - Exchange]" <newsgrou...@this.infinitec.de> wrote:
>the files are locked by the services I wish to upgrade.
>
>The ServiceControl Table hast all three services listed with the Event
>Column = 163 and Wait = 1
>
>According to MSDN
>(http://msdn.microsoft.com/en-us/library/aa371634(VS.85).aspx), 163 means:
>1 = Starts the service during the StartServices action (install).
>2 = Stops the service during the StopServices action (install).
>32 = Stops the service during the StopServices action (uninstall).
>128= Deletes the service during the DeleteServices action (uninstall).
>
>I'm performing a major upgrade here.
Just checking... Are they the same in the msi being replaced / uninstalled?
Bye,
Dennis
Dennis Bareis [Microsoft MVP] (dba...@KillSpam.gmail.com)
http://dennisbareis.com/
Freeware Windows Installer creation tool (+ "ORCA automation"):
http://makemsi.dennisbareis.com/
> Just checking... Are they the same in the msi being replaced /
> uninstalled?
Yes.. all relevant services are being replaced with the update.
Kind regards,
Henning Krause
>> Just checking... Are they the same in the msi being replaced /
>> uninstalled?
>
>Yes.. all relevant services are being replaced with the update.
I think you misunderstood, I was asking about the ServiceControl table in the msi being replaced.
Thats what matters during its uninstall.
I've scheduled RemoveExistingProducts after InstallFinalize - so I don't see
the uninstall settings having any impact on this.
Or am I missing something here?
Kind regards,
Henning Krause
"Dennis Bareis" <dba...@newsgroups.nospam> wrote in message
news:8e5f44pfeuojs2ddk...@4ax.com...