[wix-users] Problem Updating

Jon Earle earlej at hotmail.com
Mon Mar 5 10:01:28 PST 2018


Anyone have any idea?

What condition do I need to set in my shared component to NOT run when uninstalling but run it any other time?

________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Jon Earle via wix-users <wix-users at lists.wixtoolset.org>
Sent: Friday, March 2, 2018 9:58 AM
To: Jon Earle via wix-users; Hoover, Jacob; Nir Bar
Cc: Jon Earle
Subject: Re: [wix-users] Problem Updating

I found a hint "out there" regarding "shared component".  There was nothing to illustrate just what that was, so I took a guess and it appears to be mostly working..

    <Fragment>
        <Component Id="PCIDriver_SvcCtl" Directory="INSTALLDIR" Guid="{5EAB2128-228D-44BE-950F-5F258B94BFED}" Win64="$(var.Win64)" >
            <CreateFolder/>
            <!-- Any action but uninstall. -->
            <Condition>NOT REMOVE="ALL"</Condition>
            <ServiceControl Id="Service1_SvcCtl" Name="service1" Start="both" Stop="both" Wait="no" />
            <ServiceControl Id="Service2_SvcCtl" Name="service2" Start="both" Stop="both" Wait="no" />
        </Component>
    </Fragment>

Then, in my Product.wxs, for the feature that requires this (which installs the PCI drivers), I added:

<ComponentRef Id="PCIDriver_SvcCtl" />

It runs when I add/remove the PCI drivers via Modify, but also runs when I uninstall.  As there are two services, when they are removed and this is called to start them, it adds two minutes to the uninstall (as the restart is attempted twice, with a 30s wait time for each).

What condition do I need to set in my shared component to NOT run when uninstalling but run it any other time?

As well, I noticed in the command line for Uninstall, that the REMOVE property is specified twice - once with the value of ALL, the other, with the list of features to remove.  Why is that?  I suspect this is what is causing the above condition to fail.

MSI (s) (64:18) [09:43:14:277]: Command Line: ALLUSERS=1 ARPSYSTEMCOMPONENT=1 MSIFASTINSTALL=7 ADDLOCAL= INSTALLDIR=C:\Program Files\MyCompany\MyClient\ REMOVE=FEATURE1,FEATURE2,FEATURE3,FEATURE4,FEATURE5 REBOOT=ReallySuppress IGNOREDEPENDENCIES=ALL REMOVE=ALL CURRENTDIRECTORY=C:\Users\Administrator\Desktop\daily CLIENTUILEVEL=3 MSICLIENTUSESEXTERNALUI=1 CLIENTPROCESSID=2076


________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Jon Earle via wix-users <wix-users at lists.wixtoolset.org>
Sent: Thursday, March 1, 2018 3:52 PM
To: Hoover, Jacob; WiX Toolset Users Mailing List; Nir Bar
Cc: Jon Earle
Subject: Re: [wix-users] Problem Updating

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/

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

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


More information about the wix-users mailing list