简体   繁体   English

无法从另一个托管的Bootstrapper应用程序卸载WiX托管的Bootstrapper应用程序

[英]Unable to Uninstall WiX Managed Bootstrapper application from another Managed Bootstrapper Application

I have my own Managed Bootstrapper Application developed using WiX Toolset and written in c# using MVVM pattern. 我有自己的使用WiX Toolset开发的Managed Bootstrapper应用程序,并使用MVVM模式以c#编写。 As this is a Managed Bootstrapper Application, i have a custom UI as well. 由于这是一个托管的引导程序应用程序,因此我也有一个自定义UI。 My Bundle.wxs Code is as follows 我的Bundle.wxs代码如下

<Bundle Name="NestleMESSetup"
          Version="!(bind.packageVersion.NestleCustomLayerSetupPackage)"
          Manufacturer="CT Infotech"
              UpgradeCode="CCBB8D5B-8171-47FB-AD53-25C6E866C34E"
              Copyright="Copyright© 2017 CT Infotech ALL RIGHTS RESERVED"
              SplashScreenSourceFile="Resources\Splash.bmp"
              IconSourceFile="Resources\menu.ico">

        <Variable Name="KambanVersion" Type="version" Value="!(bind.packageVersion.KambanFASSetup)"/>

        <BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost">
          <PayloadGroupRef Id="InstallerPayload"/>
        </BootstrapperApplicationRef>

        <util:RegistrySearchRef Id='SearchForKamban' />

        <Chain>
          <PackageGroupRef Id="InstallerPackages"/>
        </Chain>

        <Variable Name="DbName" bal:Overridable="yes" />
        <Variable Name="SqlInstance" bal:Overridable="yes" />
        <Variable Name="InstallPath" bal:Overridable="yes" />
        <Variable Name="Roles" bal:Overridable="yes" />
        <Variable Name="Modules" bal:Overridable="yes" />
        <Variable Name="CustomInstall" bal:Overridable="yes"/>

        <WixVariable Id="WixMbaPrereqPackageId" Value="Netfx4Full" />
        <WixVariable Id="WixMbaPrereqLicenseUrl" Value="NetfxLicense.rtf" />

      </Bundle>

      <Fragment>
        <PayloadGroup Id="InstallerPayload">
          <Payload SourceFile="..\Nestle.MES.Bootstrapper.UI\BootstrapperCore.config"/>
          <Payload SourceFile="..\Nestle.MES.Bootstrapper.UI\bin\$(var.Configuration)\Nestle.MES.Bootstrapper.UI.dll"/>
          <Payload SourceFile="C:\Program Files (x86)\WiX Toolset v3.10\SDK\Microsoft.Deployment.WindowsInstaller.dll"/>
        </PayloadGroup>
      </Fragment>

      <Fragment>
        <PackageGroup Id="InstallerPackages">
          <RollbackBoundary Id="StartingPoint" Vital="yes" />
          <ExePackage Id="KambanFASSetup" Cache="no" Compressed="yes" Vital="yes" Permanent="no" Name="KambanCoreSetup"
                      SourceFile="..\..\Kamban.FAS.Setup_Source\$(var.Configuration)\KambanFASSetup.exe" >
            <CommandLine InstallArgument="[SqlInstance]" Condition="1" />
            <CommandLine InstallArgument="[DbName]" Condition="1"/>
            <CommandLine InstallArgument="[InstallPath]" Condition="1"/>
            <CommandLine InstallArgument="[Roles]" Condition="1"/>
            <CommandLine InstallArgument="[Modules]" Condition="1" />
            <CommandLine InstallArgument="[CustomInstall]" Condition="1"/>
          </ExePackage>

          <MsiPackage SourceFile="..\..\build_folder\$(var.Configuration)\Nestle.MES.CustomLayer\Nestle.MES.CustomLayerSetup.msi"
                      Id="NestleCustomLayerSetupPackage" Cache="yes" Visible="no" Compressed="yes" EnableFeatureSelection="yes" Vital="yes">
            <MsiProperty Name="INSTALLFOLDER" Value="[INSTALLFOLDER]"  />
            <MsiProperty Name="VERSION" Value="[VERSION]"/>
            <MsiProperty Name="ADDLOCAL" Value="[NestleFeatures]" />
          </MsiPackage>
        </PackageGroup>
      </Fragment>

      <Fragment>
        <util:RegistrySearch
          Id='SearchForKamban'
          Variable="KambanInstalled"
          Result="exists"
          Root="HKLM"
          Key="SOFTWARE\Wow6432Node\KambanFAS" />
        <bal:Condition Message="Product already Exists">
          KambanInstalled
        </bal:Condition>
      </Fragment>

In the above code, you can see that I have an MsiPackage and an ExePackage in my Bundle chain. 在上面的代码中,您可以看到我的捆绑链中有一个MsiPackage和一个ExePackage。 The ExePackage with Id="KambanFASSetup" is also a Managed Bootstrapper Application with its very own custom UI. 带有Id =“ KambanFASSetup”的ExePackage也是具有自己的自定义UI的托管引导程序应用程序。 Once I install this Parent bundle exe, i get two entries in my Programs and Features. 安装此父捆绑包exe后,我在“程序和功能”中得到两个条目。 I believe this is because i have two managed bootstrapper exe. 我相信这是因为我有两个托管的Bootstrapper exe。 So now while uninstalling the NestleMESSetup only my MsiPackage is getting uninstaled and my ExePackage doesnt. 因此,现在在卸载NestleMESSetup时,仅安装了我的MsiPackage,而没有安装我的ExePackage。 But my requirement is as follows 但是我的要求如下

  • The ExePackage should also be uninstalled if I uninstall the Parent Exe. 如果我卸载了父Exe,也应该同时卸载ExePackage。
  • The Uninstallation of the Child ExePackage must happen silently. Child ExePackage的卸载必须静默进行。 ie It's UI should NOT be shown prompting the user to click the Uninstall button again. 也就是说,它的用户界面应该不会显示提示用户再次点击卸载按钮。

Please let me know if more info is needed.Any help on this would be much appreciated. 如果需要更多信息,请告诉我。对此的任何帮助将不胜感激。

Edit1: Here is the Uninstall logs in %temp% folder 编辑1:这是卸载日志在%temp%文件夹中

[2658:3330][2017-05-19T19:27:11]i001: Burn v3.10.2.2516, Windows v6.1 (Build 7601: Service Pack 1), path: C:\ProgramData\Package Cache\{a21ebf3e-08b2-4b64-b5bf-38dccfea21a2}\Nestle.MES.Setup.exe
[2658:3330][2017-05-19T19:27:11]i000: Initializing version variable 'KambanVersion' to value '1.0.647.0'
[2658:3330][2017-05-19T19:27:11]i009: Command Line: '/uninstall'
[2658:3330][2017-05-19T19:27:11]i000: Setting string variable 'WixBundleLog' to value 'C:\Users\RAJASA~1.000\AppData\Local\Temp\NestleMESSetup_20170519192711.log'
[2658:3330][2017-05-19T19:27:11]i000: Setting string variable 'WixBundleManufacturer' to value 'CT Infotech'
[2658:3330][2017-05-19T19:27:11]i000: Loading managed bootstrapper application.
[2658:3330][2017-05-19T19:27:11]i000: Creating BA thread to run asynchronously.
[2658:3330][2017-05-19T19:27:11]i100: Detect begin, 2 packages
[2658:3330][2017-05-19T19:27:11]i000: Setting numeric variable 'KambanInstalled' to value 1
[2658:3330][2017-05-19T19:27:11]i101: Detected package: KambanFASSetup, state: Absent, cached: None
[2658:3330][2017-05-19T19:27:11]i101: Detected package: NestleCustomLayerSetupPackage, state: Present, cached: Complete
[2658:3330][2017-05-19T19:27:11]i104: Detected package: NestleCustomLayerSetupPackage, feature: AppFeatures, state: Local
[2658:3330][2017-05-19T19:27:11]i104: Detected package: NestleCustomLayerSetupPackage, feature: WebFeatures, state: Local
[2658:3330][2017-05-19T19:27:11]i104: Detected package: NestleCustomLayerSetupPackage, feature: DbFeatures, state: Local

Edit2: With the Detect Condition added to my Bundle chain Exe package I am not able to Uninstall the Parent exe as well. Edit2:将检测条件添加到我的捆绑链Exe软件包中后,我也无法卸载Parent exe。 The WiX logs are as follows WiX日志如下

[1450:1BBC][2017-05-20T07:33:59]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{c8fb8ef8-905f-4bd9-8675-91f62d83e5c8}, resume: Active, restart initiated: No, disable resume: No
[1644:0F04][2017-05-20T07:33:59]w341: Prompt for source of container: WixAttachedContainer, path: E:\TFS_Nestle\Nestle\build_folder\Debug\Nestle.MES.Setup\Nestle.MES.Setup.exe
[1644:0F04][2017-05-20T07:33:59]e054: Failed to resolve source for file: E:\TFS_Nestle\Nestle\build_folder\Debug\Nestle.MES.Setup\Nestle.MES.Setup.exe, error: 0x80070002.
[1644:0F04][2017-05-20T07:33:59]e000: Error 0x80070002: Failed while prompting for source (original path 'E:\TFS_Nestle\Nestle\build_folder\Debug\Nestle.MES.Setup\Nestle.MES.Setup.exe').    [1644:0F04][2017-05-20T07:33:59]e311: Failed to acquire container: WixAttachedContainer to working path: C:\Users\RAJASA~1.000\AppData\Local\Temp\{B5BE6652-F453-40B5-A2BF-6313B191EA7F}\9FD1B9E707102B3EB2E75EA87962C5C839E9588A, error: 0x80070002.
[1644:1B24][2017-05-20T07:33:59]e000: Error 0x80070002: Failed while caching, aborting execution.
[1450:1BBC][2017-05-20T07:33:59]i372: Session end, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{c8fb8ef8-905f-4bd9-8675-91f62d83e5c8}, resume: ARP, restart: None, disable resume: No
[1450:1BBC][2017-05-20T07:33:59]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{c8fb8ef8-905f-4bd9-8675-91f62d83e5c8}, resume: ARP, restart initiated: No, disable resume: No
[1644:1B24][2017-05-20T07:33:59]i399: Apply complete, result: 0x80070002, restart: None, ba requested restart:  No
[1644:1B24][2017-05-20T07:33:59]i500: Shutting down, exit code: 0x0

Your ExePackage is missing the UninstallCommand attribute so burn does not know how to properly uninstall it. 您的ExePackage缺少UninstallCommand属性,因此Burn不知道如何正确将其卸载。 It should be something like 应该是这样的

UninstallCommand="/uninstall /quiet"

and may be some additions if needed. 如有需要,可能还会添加一些。

And for burn to be able to detect the ExePackage, it should define the attribute DetectCondition. 为了使刻录能够检测到ExePackage,应定义属性DetectCondition。 Something like 就像是

DetectCondition="KambanInstalled"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Wix-托管的引导程序应用程序升级问题 - Wix - Managed Bootstrapper Application upgrade problem Wix托管的引导程序应用程序:通过捆绑包将变量传递给msi - Wix Managed bootstrapper Application: Passing variables to msi through bundle 如何在Burn Managed Bootstrapper应用程序中显示来自WiX自定义操作的信息 - How can I show information from WiX Custom Actions in Burn Managed Bootstrapper Application 无法从托管Bootstrapper应用程序C#代码中的Bootstrapper变量读取输入 - Cannot read input from Bootstrapper variable in Managed Bootstrapper Application C#-Code 在WiX自定义托管引导程序应用程序中下载安装程序包的正确方法是什么? - What is the proper way to download setup packages in a WiX custom managed bootstrapper application? 错误 0x8007000b:无法创建托管引导程序应用程序 - Error 0x8007000b: Failed to create the managed bootstrapper application 无法从控制面板中删除 wix 引导程序应用程序 - Cannot remove wix bootstrapper application from control panel WiX:如何访问/更改托管引导程序中的安装目录? - WiX: how to access / change installation directory in managed bootstrapper? WiX Burn托管引导程序无法加载-错误0x80040150 - WiX Burn Managed Bootstrapper fails to load - Errror 0x80040150 WiX Burn:如何在引导程序应用程序中更改“ WixBundleManufacturer”? - WiX burn: how to change 'WixBundleManufacturer' in bootstrapper application?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM