[wix-users] Problem Updating

Jon Earle earlej at hotmail.com
Thu Mar 1 12:52:02 PST 2018


Hm... made some progress!

I tracked it down to a service running, that was not being stopped during Modify, but had a hold on the drivers.

So, I thought I'd try stopping the service via the component which handles install/uninstall of the driver:

                <Component Id="MyPCIDriver2_Driver" Guid="{6fe4ba08-7fee-4746-9f9d-3539a236a109}" Win64="$(var.Win64)">
                    <CreateFolder/>
                    <ServiceControl Id="MyPCIDriver2_SvcCtl" Name="dependent_service" Start="both" Stop="both" Wait="no" />
                    <da:Driver AddRemovePrograms="no" PlugAndPlayPrompt="no"/>
                </Component>

While this works for Modify, removing and adding the PCI drivers, Uninstall presents me with a delay and:

MSI (s) (90:CC) [15:15:38:669]: Executing op: ServiceControl(,Name=dependent_service,Action=1,Wait=0,)
MSI (s) (90:CC) [15:16:08:678]: Product: Brand Client 7.2.0 -- Error 1920. Service 'dependent_service' (dependent_service) failed to start. Verify that you have sufficient privileges to start system services.
Error 1920. Service 'safenet.pedclient' (safenet.pedclient) failed to start. Verify that you have sufficient privileges to start system services.
MSI (s) (90:CC) [15:16:38:688]: Executing op: ServiceControl(,Name=dependent_service,Action=1,Wait=0,)
MSI (s) (90:CC) [15:17:08:696]: Product: Brand Client 7.2.0 -- Error 1920. Service 'dependent_service' (dependent_service) failed to start. Verify that you have sufficient privileges to start system services.
Error 1920. Service 'safenet.pedclient' (safenet.pedclient) failed to start. Verify that you have sufficient privileges to start system services.

So, I was hoping to add a condition to the ServiceControl element:

                <Component Id="MyPCIDriver2_Driver" Guid="{6fe4ba08-7fee-4746-9f9d-3539a236a109}" Win64="$(var.Win64)">
                    <CreateFolder/>
                    <ServiceControl Id="MyPCIDriver2_SvcCtl" Name="dependent_service" Start="both" Stop="both" Wait="no">
                        MaintenanceMode="Modify"
                    </ServiceControl>
                    <da:Driver AddRemovePrograms="no" PlugAndPlayPrompt="no"/>                </Component>

But, that throws out an error in VS, saying that the element ServiceControl cannot contain text.

So, is there a way to stop (and restart when finished) the dependent service, ONLY when removing or adding the drivers AND not uninstalling the app (ie. when performing maintenance)?

________________________________
From: Hoover, Jacob <Jacob.Hoover at greenheck.com>
Sent: Thursday, March 1, 2018 1:07 PM
To: Jon Earle; WiX Toolset Users Mailing List; Nir Bar
Subject: RE: [wix-users] Problem Updating


And the lines in the previous message don’t appear in the logs.



I did notice:

DIFXAPP: A reboot is needed to uninstall the driver package '{21CC203C-C5CC-49BF-A858-2D44A4D79EDF}'.

…

DIFXAPP: A reboot is needed to uninstall the driver package '{6FE4BA08-7FEE-4746-9F9D-3539A236A109}'.





From: Jon Earle [mailto:earlej at hotmail.com]
Sent: Thursday, March 1, 2018 10:35 AM
To: Hoover, Jacob <Jacob.Hoover at greenheck.com>; WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>; Nir Bar <nir.bar at panel-sw.com>
Subject: Re: [wix-users] Problem Updating



Log file attached from the Modify action, removing the PCI drivers.

________________________________

From: Hoover, Jacob <Jacob.Hoover at greenheck.com<mailto:Jacob.Hoover at greenheck.com>>
Sent: Wednesday, February 28, 2018 5:33 PM
To: WiX Toolset Users Mailing List; Nir Bar
Cc: Jon Earle
Subject: RE: [wix-users] Problem Updating



What is in the log right before that line?

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Jon Earle via wix-users
Sent: Wednesday, February 28, 2018 4:27 PM
To: Nir Bar <nir.bar at panel-sw.com<mailto:nir.bar at panel-sw.com>>; WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org<mailto:wix-users at lists.wixtoolset.org>>
Cc: Jon Earle <earlej at hotmail.com<mailto:earlej at hotmail.com>>
Subject: Re: [wix-users] Problem Updating

We have a couple of system services that use the drivers in questions, so I tried forcing StopServices to occur right after InstallInitialize... no change.

I noticed this in the log:

MSI (s) (6C:5C) [17:20:57:973]: RESTART MANAGER: Did detect that a critical application holds file[s] in use, so a reboot will be necessary.
MSI (s) (6C:5C) [17:20:57:973]: Note: 1: 1610 MSI (s) (6C:5C) [17:20:57:983]: RESTART MANAGER: The user chose to go on with the installation, although a reboot will be required.
The setup must update files or services that cannot be updated while the system is running. If you choose to continue, a reboot will be required to complete the setup.

Is there a way to determine exactly which "critical application" is holding which "files in use"?


________________________________
From: Nir Bar <nir.bar at panel-sw.com<mailto:nir.bar at panel-sw.com>>
Sent: Wednesday, February 28, 2018 2:15 AM
To: WiX Toolset Users Mailing List
Cc: Jon Earle
Subject: Re: [wix-users] Problem Updating

Seems like you shot yourself in the foot setting MSIRESTARTMANAGERCONTROL to DisableShutdown.
The purpose of Restart Manager is to shutdown processes that are holding files in use so that system reboot will not be necessary. By setting it to DisableShutdown you prevent it from doing exactly that which ultimately may cause system reboot to be required.

Instead, set MSIRESTARTMANAGERCONTROL to 0 or do not set it at all.
Then, if you are aware of processes that hold files in use and are not part of your package, let Restart Manager control them by adding them with RestartResource elements.


--
Nir Bar, Independent WiX Expert. Creator of-
JetBA: WiX WPF Bootstrapper User Interface Framework
JetBA++: WiX Native Bootstrapper User Interface Framework




____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list