WiX Burn:“无法启动提升的子进程”

时间:2017-04-19 03:50:46

标签: .net wix burn

我有一个WiX installer + bootstrapper,如果需要安装.NET,然后是程序本身。

每隔一段时间用户就会下载新的.exe(bootstrapper)并执行t来升级软件。直到今天,当用户报告此失败时,它工作正常:

[332C:4928][2017-04-19T12:00:23]i001: Burn v3.10.3.3007, Windows v10.0 (Build 14393: Service Pack 0), path: C:\Users\THEUSER\AppData\Local\Temp\{C478950B-3D46-44E2-BAB5-5585923EE408}\.cr\CmisSync.2.10.0.0.exe
[332C:4928][2017-04-19T12:00:23]i000: Initializing string variable 'InstallFolder' to value '[ProgramFilesFolder]CmisSync'
[332C:4928][2017-04-19T12:00:23]i000: Initializing string variable 'LaunchTarget' to value '[InstallFolder]\CmisSync.exe'
[332C:4928][2017-04-19T12:00:23]i009: Command Line: '-burn.clean.room=C:\Users\the.user\Downloads\CmisSync.2.10.0.0.exe -burn.filehandle.attached=536 -burn.filehandle.self=544'
[332C:4928][2017-04-19T12:00:23]i000: Setting string variable 'WixBundleOriginalSource' to value 'C:\Users\the.user\Downloads\CmisSync.2.10.0.0.exe'
[332C:4928][2017-04-19T12:00:23]i000: Setting string variable 'WixBundleOriginalSourceFolder' to value 'C:\Users\the.user\Downloads\'
[332C:4928][2017-04-19T12:00:23]i000: Setting string variable 'WixBundleLog' to value 'C:\Users\THEUSER\AppData\Local\Temp\CmisSync_20170419120023.log'
[332C:4928][2017-04-19T12:00:23]i000: Setting string variable 'WixBundleName' to value 'CmisSync'
[332C:4928][2017-04-19T12:00:23]i000: Setting string variable 'WixBundleManufacturer' to value 'Aegif'
[332C:44DC][2017-04-19T12:00:23]i000: Setting numeric variable 'WixStdBALanguageId' to value 1033
[332C:44DC][2017-04-19T12:00:23]i000: Setting version variable 'WixBundleFileVersion' to value '2.10.0.0'
[332C:4928][2017-04-19T12:00:23]i100: Detect begin, 2 packages
[332C:4928][2017-04-19T12:00:23]i000: Setting string variable 'NETFRAMEWORK40CLIENT' to value '1'
[332C:4928][2017-04-19T12:00:23]i102: Detected related bundle: {c07be410-1b91-4743-9b0d-7ca57eaf5b4b}, type: Upgrade, scope: PerMachine, version: 2.9.4.0, operation: MajorUpgrade
[332C:4928][2017-04-19T12:00:23]i052: Condition 'NETFRAMEWORK40CLIENT' evaluates to true.
[332C:4928][2017-04-19T12:00:23]i103: Detected related package: {23519296-B134-46F5-A3D5-1E1E3A82C995}, scope: PerMachine, version: 2.9.4.0, language: 0 operation: MajorUpgrade
[332C:4928][2017-04-19T12:00:23]i103: Detected related package: {23519296-B134-46F5-A3D5-1E1E3A82C995}, scope: PerMachine, version: 2.9.4.0, language: 0 operation: MajorUpgrade
[332C:4928][2017-04-19T12:00:23]i101: Detected package: NetFx40ClientWeb, state: Present, cached: None
[332C:4928][2017-04-19T12:00:23]i101: Detected package: CmisSync.msi, state: Absent, cached: None
[332C:4928][2017-04-19T12:00:23]i199: Detect complete, result: 0x0
[332C:44DC][2017-04-19T12:00:28]i000: Setting numeric variable 'EulaAcceptCheckbox' to value 1
[332C:4928][2017-04-19T12:00:28]i200: Plan begin, 2 packages, action: Install
[332C:4928][2017-04-19T12:00:28]w321: Skipping dependency registration on package with no dependency providers: NetFx40ClientWeb
[332C:4928][2017-04-19T12:00:28]i000: Setting string variable 'WixBundleRollbackLog_CmisSync.msi' to value 'C:\Users\THEUSER\AppData\Local\Temp\CmisSync_20170419120023_000_CmisSync.msi_rollback.log'
[332C:4928][2017-04-19T12:00:28]i000: Setting string variable 'WixBundleLog_CmisSync.msi' to value 'C:\Users\THEUSER\AppData\Local\Temp\CmisSync_20170419120023_000_CmisSync.msi.log'
[332C:4928][2017-04-19T12:00:28]i201: Planned package: NetFx40ClientWeb, state: Present, default requested: Present, ba requested: Present, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[332C:4928][2017-04-19T12:00:28]i201: Planned package: CmisSync.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: Yes, uncache: Yes, dependency: Register
[332C:4928][2017-04-19T12:00:28]i207: Planned related bundle: {c07be410-1b91-4743-9b0d-7ca57eaf5b4b}, type: Upgrade, default requested: Absent, ba requested: Absent, execute: Uninstall, rollback: Install, dependency: None
[332C:4928][2017-04-19T12:00:28]i299: Plan complete, result: 0x0
[332C:4928][2017-04-19T12:00:28]i300: Apply begin
[332C:4928][2017-04-19T12:00:28]i010: Launching elevated engine process.
[332C:4928][2017-04-19T12:00:31]e000: Error 0x800700ff: Failed to launch elevated child process: C:\Users\THEUSER\AppData\Local\Temp\{6A22253A-4893-4903-BE11-B599E28935BF}\.be\CmisSync.exe
[332C:4928][2017-04-19T12:00:31]e000: Error 0x800700ff: Failed to elevate.
[332C:4928][2017-04-19T12:00:31]e000: Error 0x800700ff: Failed to actually elevate.
[332C:4928][2017-04-19T12:00:31]e000: Error 0x800700ff: Failed to elevate.
[332C:4928][2017-04-19T12:00:31]i399: Apply complete, result: 0x800700ff, restart: None, ba requested restart:  No

可能出现什么问题?
这是我的Product.wxs:

<?xml version="1.0" encoding="Windows-1252"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension" >

  <Product Name="CmisSync" Id="*" UpgradeCode="4C725498-9D2D-43BF-8966-FEEACE102830"
    Language="1033" Codepage="1252" Version="$(var.BuildVersion)" Manufacturer="Aegif">

    <Package Id="*" Keywords="Installer" Description="CmisSync Setup" Manufacturer="Aegif"
      InstallerVersion="100" Languages="1033" Compressed="yes" SummaryCodepage="1252" InstallScope="perMachine" />

    <PropertyRef Id="NETFRAMEWORK40CLIENT" />
    <Condition Message="This application requires .NET Framework 4.0. Please install the .NET Framework then run this installer again. Download: http://www.microsoft.com/en-us/download/details.aspx?id=17113">
      <![CDATA[Installed OR NETFRAMEWORK40CLIENT]]>
    </Condition>

    <Media Id="1" Cabinet="CmisSync.cab" EmbedCab="yes"/>

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder">
        <Directory Id="INSTALLDIR" Name="CmisSync">
          <Directory Id="DIR_x86" Name="x86"/>
          <Directory Id="DIR_x64" Name="x64"/>
          <Directory Id="localeDirectoryCS" Name="cs"/>
          <Directory Id="localeDirectoryDE" Name="de"/>
          <Directory Id="localeDirectoryES" Name="es-ES"/>
          <Directory Id="localeDirectoryFR" Name="fr"/>
          <Directory Id="localeDirectoryJA" Name="ja"/>
          <Directory Id="localeDirectoryNL" Name="nl"/>
          <Directory Id="localeDirectoryPL" Name="pl"/>
          <Directory Id="localeDirectoryUK" Name="uk"/>
          <!--<Directory Id="localeDirectoryTLH" Name="tlh-KX"/>-->
          <Directory Id="PLUGINS_DIR" Name="plugins"/>
        </Directory>
      </Directory>
      <Directory Id="ProgramMenuFolder">
        <Directory Id="CmisSyncProgramsFolder" Name="CmisSync"/>
      </Directory>
      <Directory Id="DesktopFolder"/>
      <!--<Directory Id="AppDataFolder">
        <Directory Id="CmisSyncAppDataFolder" Name="cmissync"/>
      </Directory>-->
      <Directory Id="StartupFolder"/>
    </Directory>

    <DirectoryRef Id="INSTALLDIR">
      <Component Id="CmisSync.exe" Guid="A4C9FAFF-7698-4B7A-A055-5EC4847CA133">
        <File Id="CmisSync.exe" Name="CmisSync.exe" Source="$(var.CmisSync.TargetPath)" KeyPath="yes" DiskId="1" />
      </Component>
      <Component Id="CmisSync.Console.exe" Guid="4F59D72E-28DE-4B09-98B9-92E440ED2BC9">
        <File Id="CmisSync.Console.exe" Name="CmisSync.Console.exe" Source="$(var.CmisSync.Console.TargetPath)" KeyPath="yes" DiskId="1" />
      </Component>
      <Component Id="Libraries" Guid="00062076-DE98-41BD-A0E4-CA3BD1A6AB41">
        <File Id="CmisSync.Lib.dll" Name="CmisSync.Lib.dll" Source="$(var.CmisSync.TargetDir)\CmisSync.Lib.dll" KeyPath="yes" DiskId="1" />
        <File Id="CmisSync.Auth.dll" Name="CmisSync.Auth.dll" Source="$(var.CmisSync.TargetDir)\CmisSync.Auth.dll" DiskId="1" />
        <File Id="DotCMIS.dll" Name="DotCMIS.dll" Source="$(var.CmisSync.TargetDir)\DotCMIS.dll" DiskId="1" />
        <File Id="log4net.dll" Name="log4net.dll" Source="$(var.CmisSync.TargetDir)\log4net.dll" DiskId="1" />
        <File Id="Newtonsoft.Json.dll" Name="Newtonsoft.Json.dll" Source="$(var.CmisSync.TargetDir)\Newtonsoft.Json.dll" DiskId="1" />
        <File Id="System.Data.SQLite.dll" Name="System.Data.SQLite.dll" Source="$(var.CmisSync.TargetDir)\System.Data.SQLite.dll" DiskId="1" />
        <File Id="cmissync_app.ico" Name="cmissync.ico" Source="$(var.CmisSync.ProjectDir)\Pixmaps\cmissync-app.ico" DiskId="1" />
      </Component>
    </DirectoryRef>

    <DirectoryRef Id="DIR_x86">
      <Component Id="COMP_x86" Guid="0D70581F-8A17-42A2-9D34-682AC663ACEC">
        <CreateFolder />
        <File Id="SQLite_x86" Name="SQLite.Interop.dll" Source="$(var.CmisSync.TargetDir)\x86\SQLite.Interop.dll" KeyPath="yes" DiskId="1" />
      </Component>
    </DirectoryRef>

    <DirectoryRef Id="DIR_x64">
      <Component Id="COMP_x64" Guid="B9D4DB30-71D6-4FD8-90B4-2B0E72E6BB66">
        <CreateFolder />
        <File Id="SQLite_x64" Name="SQLite.Interop.dll" Source="$(var.CmisSync.TargetDir)\x64\SQLite.Interop.dll" KeyPath="yes" DiskId="1" />
      </Component>
    </DirectoryRef>

    <DirectoryRef Id="localeDirectoryCS">
      <Component Id="localeComponentCS" Guid="C84BF5D4-4B4E-4FC4-9116-4BD0878EBDD4">
        <CreateFolder />
        <File Id="localeFileCS" Name="CmisSync.resources.dll" Source="$(var.CmisSync.TargetDir)\cs\CmisSync.resources.dll" KeyPath="yes" DiskId="1" />
      </Component>
    </DirectoryRef>

    <DirectoryRef Id="localeDirectoryDE">
      <Component Id="localeComponentDE" Guid="FC474E35-94BC-4B57-9541-03551DF14642">
        <CreateFolder />
        <File Id="localeFileDE" Name="CmisSync.resources.dll" Source="$(var.CmisSync.TargetDir)\de\CmisSync.resources.dll" KeyPath="yes" DiskId="1" />
      </Component>
    </DirectoryRef>

    <DirectoryRef Id="localeDirectoryES">
      <Component Id="localeComponentES" Guid="5808008D-7471-4529-AED4-6289743B3611">
        <CreateFolder />
        <File Id="localeFileES" Name="CmisSync.resources.dll" Source="$(var.CmisSync.TargetDir)\es-ES\CmisSync.resources.dll" KeyPath="yes" DiskId="1" />
      </Component>
    </DirectoryRef>

    <DirectoryRef Id="localeDirectoryFR">
      <Component Id="localeComponentFR" Guid="4E49C03E-F595-4C83-B2C5-A2E73C97E327">
        <CreateFolder />
        <File Id="localeFileFR" Name="CmisSync.resources.dll" Source="$(var.CmisSync.TargetDir)\fr\CmisSync.resources.dll" KeyPath="yes" DiskId="1" />
      </Component>
    </DirectoryRef>

    <DirectoryRef Id="localeDirectoryJA">
      <Component Id="localeComponentJA" Guid="953D63DF-E558-4D50-9F73-7DD51E64D8DA">
        <CreateFolder />
        <File Id="localeFileJA" Name="CmisSync.resources.dll" Source="$(var.CmisSync.TargetDir)\ja\CmisSync.resources.dll" KeyPath="yes" DiskId="1" />
      </Component>
    </DirectoryRef>

    <DirectoryRef Id="localeDirectoryNL">
      <Component Id="localeComponentNL" Guid="F726E946-E3CD-4806-9883-F06650B4AEBD">
        <CreateFolder />
        <File Id="localeFileNL" Name="CmisSync.resources.dll" Source="$(var.CmisSync.TargetDir)\nl\CmisSync.resources.dll" KeyPath="yes" DiskId="1" />
      </Component>
    </DirectoryRef>

    <DirectoryRef Id="localeDirectoryPL">
      <Component Id="localeComponentPL" Guid="9290EFD5-B859-452A-9304-B18279152F45">
        <CreateFolder />
        <File Id="localeFilePL" Name="CmisSync.resources.dll" Source="$(var.CmisSync.TargetDir)\pl\CmisSync.resources.dll" KeyPath="yes" DiskId="1" />
      </Component>
    </DirectoryRef>

    <DirectoryRef Id="localeDirectoryUK">
      <Component Id="localeComponentUK" Guid="DEBFFC43-1334-4409-9132-4678D76C19E0">
        <CreateFolder />
        <File Id="localeFileUK" Name="CmisSync.resources.dll" Source="$(var.CmisSync.TargetDir)\uk\CmisSync.resources.dll" KeyPath="yes" DiskId="1" />
      </Component>
    </DirectoryRef>

    <!-- TODO Somehow the following is not generated by Visual C#
    <DirectoryRef Id="localeDirectoryTLH">
      <Component Id="localeComponentTLH" Guid="F2251FC8-832D-4B30-80E4-0C05285ABE3A">
        <CreateFolder />
        <File Id="localeFileTLH" Name="CmisSync.resources.dll" Source="$(var.CmisSync.TargetDir)\tlh-KX\CmisSync.resources.dll" KeyPath="yes" DiskId="1" />
      </Component>
    </DirectoryRef>
    -->

    <DirectoryRef Id="CmisSyncProgramsFolder">
      <Component Id="StartMenuShortcut" Guid="FCFFE059-4D1F-4E0C-AFE7-8F5B77390EE3">
        <Shortcut Id="ApplicationStartMenuShortcut"
                  Name="CmisSync"
                  Target="[INSTALLDIR]CmisSync.exe"
                  WorkingDirectory="INSTALLDIR"/>
        <RemoveFolder Id="CmisSyncProgramsFolder" On="uninstall"/>
        <RegistryValue Root="HKCU" Key="Software\CmisSync" Name="StartMenuShortcut" Type="integer" Value="1" KeyPath="yes"/>
      </Component>
    </DirectoryRef>

    <DirectoryRef Id="DesktopFolder">
      <Component Id="DesktopShortcut" Guid="34192850-2445-4C0B-A0A2-2EEDC2BE03DF">
        <Shortcut Id="ApplicationDesktopShortcut"
                  Name="CmisSync"
                  Target="[INSTALLDIR]CmisSync.exe"
                  WorkingDirectory="INSTALLDIR"/>
        <RemoveFile Id="DesktopFolder" Name="CmisSync.lnk" On="uninstall"/>
        <RegistryValue Root="HKCU" Key="Software\CmisSync" Name="DesktopShortcut" Type="integer" Value="1" KeyPath="yes"/>
      </Component>
    </DirectoryRef>

<!--    <DirectoryRef Id="CmisSyncAppDataFolder">
      <Component Id="CmisSyncAppData" DiskId="1" Guid="C75496CB-DF13-42C7-8520-DB4574411B14">
        <RemoveFile Id="CleanDataDirectory" Name="*" On="both"/>
        <RemoveFolder Id="RemoveDataDirectory" On="both"/>
        <RegistryValue Root="HKCU" Key="Software\CmisSync" Name="CmisSyncAppData" Type="integer" Value="1" KeyPath="yes"/>
      </Component>
    </DirectoryRef> -->

    <DirectoryRef Id="StartupFolder">
      <Component Id="StartupMenuItem" Guid="46C6E4A6-74C4-4D1B-AD7E-38F2F92144F6">
        <RemoveFile Id="RemoveStartupItem" Name="CmisSync.lnk" On="uninstall"/>
        <RegistryValue Root="HKCU" Key="Software\CmisSync" Name="StartupMenuItem" Type="integer" Value="1" KeyPath="yes"/>
      </Component>
    </DirectoryRef>

    <Feature Id="CmisSyncFeature" Title="CmisSync" Description="CmisSync" Level="1" AllowAdvertise="no">
      <ComponentRef Id="CmisSync.exe" />
      <ComponentRef Id="CmisSync.Console.exe" />
      <ComponentRef Id="Libraries" />
      <ComponentRef Id="COMP_x86" />
      <ComponentRef Id="COMP_x64" />
      <ComponentRef Id="StartMenuShortcut" />
      <ComponentRef Id="DesktopShortcut" />
      <ComponentRef Id="StartupMenuItem" />
      <ComponentRef Id="localeComponentCS" />
      <ComponentRef Id="localeComponentDE" />
      <ComponentRef Id="localeComponentES" />
      <ComponentRef Id="localeComponentFR" />
      <ComponentRef Id="localeComponentJA" />
      <ComponentRef Id="localeComponentNL" />
      <ComponentRef Id="localeComponentPL" />
      <ComponentRef Id="localeComponentUK" />
      <!--<ComponentGroupRef Id="pluginsComponentGroup" />-->
    </Feature>

    <WixVariable Id="WixUILicenseRtf" Value="license.rtf" />
    <WixVariable Id="WixUIBannerBmp" Value="WixUIBanner.bmp" />
    <WixVariable Id="WixUIDialogBmp" Value="WixUIDialog.bmp" />
    <UI>
      <UIRef Id="WixUI_Minimal"/>
    </UI>

    <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />

    <Icon Id="icon.ico" SourceFile="$(var.CmisSync.ProjectDir)\Pixmaps\cmissync-app.ico"/>
    <Property Id="ARPPRODUCTICON" Value="icon.ico" />

    <Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" />
    <Upgrade Id="4C725498-9D2D-43BF-8966-FEEACE102830">
      <UpgradeVersion
         Minimum="1.0.0.0" Maximum="99.0.0.0"
         Property="PREVIOUSVERSIONSINSTALLED"
         IncludeMinimum="yes" IncludeMaximum="no" />
    </Upgrade>

    <!-- Incompatible with block "Upgrade" above it seems
    <InstallExecuteSequence>
      <RemoveExistingProducts After="InstallInitialize"></RemoveExistingProducts>
    </InstallExecuteSequence>-->

    <MajorUpgrade
      Schedule="afterInstallInitialize"
      DowngradeErrorMessage="A later version of CmisSync is already installed. Setup will now exit." />
  </Product>
</Wix>

我的Bundle.wxs:

<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
  <Bundle
    Name="CmisSync"
    Version="$(var.BuildVersion)"
    Manufacturer="Aegif"
    IconSourceFile="$(var.CmisSync.ProjectDir)\Pixmaps\cmissync-app.ico"
    UpgradeCode="12F52B78-05B3-4A20-9BAE-2211A807A3E7">

    <Variable Name="InstallFolder" Type="string" Value="[ProgramFilesFolder]CmisSync"/>

    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLargeLicense">
      <bal:WixStandardBootstrapperApplication
          LaunchTarget="[InstallFolder]\CmisSync.exe"
          LicenseFile="license.rtf"
          LogoFile="logo.png"
          ShowVersion="yes"
          SuppressDowngradeFailure="no"
          SuppressOptionsUI="no"
          SuppressRepair="no"
          ThemeFile="CustomTheme.xml"
          LocalizationFile="CustomTheme.wxl"
      />
    </BootstrapperApplicationRef>

    <Chain>
      <PackageGroupRef Id="NetFx40ClientWeb" />
      <RollbackBoundary />
      <MsiPackage
          DisplayName="CmisSync Application"
          SourceFile="$(var.Installer.TargetPath)"
          DisplayInternalUI="no"
          Visible="no"
          Vital="yes"
          Permanent="no"
          Cache="no">
        <MsiProperty Name="INSTALLDIR" Value="[InstallFolder]" />
      </MsiPackage>
    </Chain>
  </Bundle>
</Wix>

1 个答案:

答案 0 :(得分:0)

错误代码0x800700ff是“扩展属性已损坏”。因此,这不是安装程序中的问题,而是用户系统的问题。