[wix-users] Patcher Bootstrapper and Admin

Patterson, Brent bcpatterson at xactware.com
Wed Nov 23 07:49:25 PST 2016

It's me again, with another patching issue... lol (We resolved the "revert file" by hacking the file and giving it a higher version number)

This time, it's related to admin and patching.  We use a bootstrapper to apply patches because it gives us ability to have nice UI.  In fact, the UI code is shared by both installer and patcher.  But the bundles are different.  The patcher bundle contains all the MSPs that is needed.  I've made it so that if a MSP is not there, it gets skipped over without breaking the process.  Each patch is sequential, meaning the previous patch has to be applied before the current one.  It all works, except for a customer which have their computers pretty locked down.

We checked, and the MSPs can be manually applied (everything is correctly signed, including the bootstrapper and the engine it contains).  But when the bootstrapper tries to start the process of applying patches, we get this error:

[0EBC:193C][2016-11-17T16:40:02]i010: Launching elevated engine process.
[0EBC:193C][2016-11-17T16:40:16]i011: Launched elevated engine process.
[0EBC:193C][2016-11-17T16:40:16]i012: Connected to elevated engine.
[1A38:16BC][2016-11-17T16:40:16]i358: Pausing automatic updates.
[1A38:16BC][2016-11-17T16:40:16]w308: Automatic updates could not be paused due to error: 0x80240025. Continuing...
[1A38:16BC][2016-11-17T16:40:16]i360: Creating a system restore point.
[1A38:16BC][2016-11-17T16:40:16]w363: Could not create system restore point, error: 0x80070005. Continuing...
[1A38:16BC][2016-11-17T16:40:16]i370: Session begin, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{c9811909-bbb4-4e6b-b4ce-8dfd1a9f0a01}, options: 0x7, disable resume: No
[1A38:16BC][2016-11-17T16:40:22]e000: Error 0x80070005: Failed to secure cache path: C:\ProgramData\Package Cache\
[1A38:16BC][2016-11-17T16:40:22]e000: Error 0x80070005: Failed to secure cache directory: C:\ProgramData\Package Cache\
[1A38:16BC][2016-11-17T16:40:22]e000: Error 0x80070005: Failed to create completed cache path for bundle.
[1A38:16BC][2016-11-17T16:40:22]e000: Error 0x80070005: Failed to cache bundle from path: C:\Users\vv0578\AppData\Local\Temp\{B59EB458-D64A-4639-B748-D20A295AE952}\.be\Patcher.exe
[1A38:16BC][2016-11-17T16:40:22]e000: Error 0x80070005: Failed to begin registration session.
[0EBC:193C][2016-11-17T16:40:22]e000: Error 0x80070005: Failed to begin registration session in per-machine process.
[0EBC:193C][2016-11-17T16:40:22]e000: Error 0x80070005: Failed to register bundle.
[0EBC:193C][2016-11-17T16:40:22]i399: Apply complete, result: 0x80070005, restart: None, ba requested restart:  No
[0EBC:193C][2016-11-17T16:40:28]i500: Shutting down, exit code: 0x80070005

It looks like the patcher is trying to install itself as part of the patching process?  How can we work around this?  The MSPs do not require elevation to install, only the bootstrapper patcher.  The patcher bundle looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    Condition="VersionNT >= v6.1"
    <BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost" >
     (required dlls included here)
      <Payload SourceFile="C:\Program Files\WiX Toolset v3.10\SDK\Microsoft.Deployment.WindowsInstaller.dll"/>

    <WixVariable Id="WixMbaPrereqLicenseUrl" Value=""/>
    <WixVariable Id="WixMbaPrereqPackageId" Value=""/>

    <Variable Name="{REPLACE_MSP_NAME}" Value="False"/>

    <RelatedBundle Id="(Redacted)" Action="Patch"/>

                     <MspPackage SourceFile="{PATH_TO_PATCH_MSP}" Compressed="no" Cache="no" Vital="yes" InstallCondition="{REPLACE_MSP_NAME}="True"" />

The "{REPLACE_MSP_NAME}" is a variable that is set by the bootstrapper which checks to see if the MSP file is present in the same folder as the bootstrapper exe.  If it's false, the MSP gets skipped, preventing errors related with "FILE NOT FOUND", while allowing us to handle errors returned by MSPs that are actually processed.

The UpgradeCode is different each time it's built, so that the patcher supersedes the previous one.

RelatedBundle is same GUID as the one in Installer, but Installer has "Detect" and patcher has "Patch" for Action.

Is there a way to make the bundle not require admin elevation?  Thanks.


Xactware's opt-in mailing list allows you to receive Xactware News that is of interest to you. Visit my.xactware.com today to join or to update your email preferences!


This email is intended solely for the recipient. It may contain privileged, proprietary or confidential information or material. If you are not the intended recipient, please delete this email and any attachments and notify the sender of the error.

More information about the wix-users mailing list