2016-07-07 13 views
0

私は完全なUIを備えた既存のwix msiプロジェクトを持っています。私はwixバンドルを作成し、このブートストラッププロジェクトでmsiプロジェクトを参照しました。これはmsiを完璧にインストールしますが、アンインストール時にmsiを呼び出すことはありません.msi package.ButのDisplayInternalUI = "yes"この問題を回避する方法として、DisplayInternalUIをnoに設定することはできません.msi UIをinstall.Isで表示したいので、DisplayInternalUIをnoにする方法がありますインストール時にyesに設定します。DisplayInternalUI = "yes"の場合、Wixブートストラップがアンインストール中にmsiファイルを呼び出さない

<Bundle Name="$(var.ProductName)" Version="$(var.ProductVersion)" Manufacturer="Name" UpgradeCode="GUID" > 
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" > 
     <bal:WixStandardBootstrapperApplication  SuppressOptionsUI="yes" LicenseUrl="" /> 
    </BootstrapperApplicationRef> 

    <util:RegistrySearch Id="Office2007_Installed" Variable="OFFICE2007" Root="HKLM" Key="Software\Microsoft\Office\12.0\Outlook\InstallRoot" Result="exists" /> 
    <util:RegistrySearch Id="VSTOR_Installed" Variable="VSTOR40" Root="HKLM" Key="SOFTWARE\Microsoft\VSTO Runtime Setup\v4R" Result="exists" /> 
    <util:RegistrySearch Id="VSTOR_Installed1" Variable="VSTOR40_1" Root="HKLM" Key="SOFTWARE\Microsoft\VSTO Runtime Setup\v4" Result="exists" /> 
    <util:RegistrySearch Id="VSTOR_Installed2" Variable="VSTOR40_2" Root="HKLM" Key="SOFTWARE\Wow6432Node\Microsoft\VSTO Runtime Setup\v4" Result="exists" /> 
    <util:RegistrySearch Id="VSTOR_Installed3" Variable="VSTOR40_3" Root="HKLM" Key="SOFTWARE\Wow6432Node\Microsoft\VSTO Runtime Setup\v4R" Result="exists" /> 

     <Chain> 
      <!-- TODO: Define the list of chained packages. --> 
      <!-- <MsiPackage SourceFile="path\to\your.msi" /> --> 
     <ExePackage Id="INSTALLVSTO" SourceFile="vstor_redist.exe" Vital="yes" Compressed="no" Permanent="yes" 
        DownloadUrl="http://go.microsoft.com/fwlink/?LinkId=158917" 
        InstallCommand="/q /norestart" 
        DetectCondition="VSTOR40 OR VSTOR40_1 OR VSTOR40_2 OR VSTOR40_3" 
        InstallCondition="NOT (VSTOR40 OR VSTOR40_1 OR VSTOR40_2 OR VSTOR40_3)" /> 
     <RollbackBoundary /> 

     <MsiPackage Compressed="yes" SourceFile="$(var.Msi Project name.TargetPath)" Vital="yes" DisplayInternalUI="yes" Cache="no"> 

     </MsiPackage> 


     </Chain> 
    </Bundle> 

ここにProduct.wxsファイルがあります。

<?xml version="1.0" encoding="utf-8"?> 
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension"> 
    <?define ProductName = "Outlook Plug-In"?> 
    <?define ProductVersion = "4.0.8.7"?> 

    <Product Id="81f4a93f-ee3f-438d-a836-741666112715" Name="$(var.ProductName)" Language="1033" Version="$(var.ProductVersion)" Manufacturer="ABC" UpgradeCode="{B9080C51-8F85-4D5B-9387-DE942A43C985}" > 
    <!--InstallScope to hide Administrator login on installation--> 
    <Package Id="*" InstallerVersion="200" Compressed="yes" InstallScope="perMachine"/> 
    <Binary Id="SummaryA" SourceFile="Bitmap\Summary.bmp" /> 
    <Binary Id="CustomAction_OutlookPlugin" SourceFile="..\..\CustomPane_outlookAddIn\Installer_CustomActions\bin\$(var.Configuration)\Installer_CustomActions.CA.dll" /> 
    <Binary Id="SummaryB" SourceFile="Bitmap\MaintienanceSum.bmp" /> 
    <Binary Id="Bmp_Install" SourceFile="Bitmap\Destination.bmp" /> 
    <Binary Id="LicdialogBmp" SourceFile="Bitmap\License.bmp" /> 
    <Binary Id="Banner" SourceFile="Bitmap\bannrbmp.bmp" /> 
    <Binary Id="ProgressA" SourceFile="Bitmap\Installation.bmp" /> 
    <Binary Id="ProgressB" SourceFile="Bitmap\MaintienancePro.bmp" /> 
    <Binary Id="VerifyReadyDlgA" SourceFile="Bitmap\InstallationType.bmp" /> 
    <Binary Id="VerifyReadyDlgB" SourceFile="Bitmap\MaintienanceIns.bmp" /> 
    <Binary Id="Bmp_Dialog" SourceFile="Bitmap\Introduction.bmp" /> 
    <Binary Id="Maintienance" SourceFile="Bitmap\Maintienance.bmp" /> 
    <Icon Id="icon.ico" SourceFile="..\..\CustomPane_outlookAddIn\CustomPane_outlookAddIn\Resources\ECM_Icon_v1.ico"/> 
    <Property Id="ARPPRODUCTICON" Value="icon.ico" /> 
    <Property Id="OFFICE2007" Value="0"/> 
    <Property Id="SectionName"/> 

    <Property Id="OFFICE_2007_32" > 
     <RegistrySearch Id="Office32" Win64="no" Name ="Path" Root="HKLM" Key="Software\Microsoft\Office\12.0\Outlook\InstallRoot" Type="raw" /> 
    </Property> 
    <Property Id="OFFICE_2007_64"> 
     <RegistrySearch Id="Office64" Win64="yes" Name="Path" Root="HKLM" Key="Software\Microsoft\Office\12.0\Outlook\InstallRoot" Type="raw" > 
     </RegistrySearch> 
    </Property> 

    <Property Id="PluginVersion" Value="$(var.ProductVersion)"/> 
    <Property Id="PluginDescription" Value="Outlook Plug-In"/> 
    <Property Id="FriendlyName" Value="Outlook Addin($(var.ProductVersion))"/> 
    <Property Id="VSTOName" Value="CustomPane_outlookAddIn.vsto|vstolocal"/> 
    <!--Property Section--> 
    <!--To Check NETFRAMEWORK--> 
    <PropertyRef Id="NETFRAMEWORK45" /> 
    <Condition Message='This setup requires Microsoft .NET Framework 4.5 package or greater needs to be installed for this installation to continue.'> 
     <![CDATA[Installed OR NETFRAMEWORK45]]> 
    </Condition> 
    <!--To Check Upgrade--> 
    <Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" /> 
    <Property Id="NEWERPRODUCTFOUND" Secure="yes" /> 
    <!--For LocalAppData--> 
    <Property Id="REMEMBERME"> 
     <RegistrySearch Id="RememberProperty" Root="HKCU" 
      Key="SOFTWARE\Wix\DemoRememberProperty" 
      Name="Remembered" Type="raw"/> 
    </Property> 
    <Property Id="REMEMBERME1"> 
     <RegistrySearch Id="RememberProperty1" Root="HKCU" 
      Key="SOFTWARE\Wix\DemoRememberProperty1" 
      Name="Remembered1" Type="raw"/> 
    </Property> 
    <!--Set Initial directory browseproperty--> 
    <Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION"/> 
    <Property Id="SETALLUSERS"/> 
    <!--<SetProperty Id="SETALLUSERS" Before="AppSearch" Value="{}"> 
    </SetProperty>--> 

    <!-- Default configuration values --> 


    <Property Id="SERVICEURL">Server Url/Environment</Property> 

    <Property Id="GETALLUSERS"> 
     <RegistrySearch Id="GETALLUSERSRegistry" Type="raw" 
       Root='HKLM' Key='Software\Microsoft\Office\Outlook\AddIns\OutlookAddin' Name='Manifest'/> 
    </Property> 
    <Property Id="GETPERUSERS"> 
     <RegistrySearch Id="GETPERUSERSRegistry" Type="raw" 
       Root='HKCU' Key='Software\Microsoft\Office\Outlook\AddIns\OutlookAddin' Name='Manifest'/> 
    </Property> 

    <Feature Id="CustomPane_outlookAddIn" Title="Outlook Addin" Level="1" > 
     <Component Id="FOLDER" Guid="*" DiskId="1" Directory="ABC" > 
     <RegistryValue Root="HKCU" Key="SOFTWARE\Wix\DemoRememberProperty" Name="Remembered1" Value="[REMEMBERME1]" Type="string" KeyPath="yes"/> 
     <RemoveFolder Id="CleanupFolder" On="uninstall" /> 
     </Component> 

     <Component Id="ProductFiles" Guid="9bb98af7-870b-4ce6-b2be-fd42203528ec" DiskId="1" Directory='INSTALLLOCATION' > 
     <CreateFolder Directory="INSTALLLOCATION"> 
      <Permission User="Everyone" GenericAll="yes" /> 
     </CreateFolder> 
     <File Id="CustomPane_outlookAddIn_dll" Name="CustomPane_outlookAddIn.dll" Source="..\..\CustomPane_outlookAddIn\CustomPane_outlookAddIn\bin\$(var.Build)\CustomPane_outlookAddIn.dll" /> 
     <File Id="CustomPane_outlookAddIn_dll_manifest" Name="CustomPane_outlookAddIn.dll.manifest" Source="..\..\CustomPane_outlookAddIn\CustomPane_outlookAddIn\bin\$(var.Build)\CustomPane_outlookAddIn.dll.manifest" /> 
     <File Id="CustomPane_outlookAddIn_vsto" Name="CustomPane_outlookAddIn.vsto" Source="..\..\CustomPane_outlookAddIn\CustomPane_outlookAddIn\bin\$(var.Build)\CustomPane_outlookAddIn.vsto" /> 
     <File Id="libeay32_dll" Name="libeay32.dll" Source="..\..\CustomPane_outlookAddIn\Third Party Libs\libeay32.dll" /> 
     <File Id="libgcc_s_dw2_1_dll" Name="libgcc_s_dw2-1.dll" Source="..\..\CustomPane_outlookAddIn\Third Party Libs\libgcc_s_dw2-1.dll" /> 
     <File Id="ssleay32_dll" Name="ssleay32.dll" Source="..\..\CustomPane_outlookAddIn\Third Party Libs\ssleay32.dll" /> 
     <File Id="wkhtmltopdf_exe" Name="wkhtmltopdf.exe" Source="..\..\CustomPane_outlookAddIn\Third Party Libs\wkhtmltopdf.exe" /> 
     <File Id="OutlookGridControl_dll" Name="OutlookGridControl.dll" Source="..\..\CustomPane_outlookAddIn\CustomPane_outlookAddIn\bin\$(var.Build)\OutlookGridControl.dll" /> 
     <File Id="UtilityClassess_dll" Name="UtilityClasses.dll" Source="..\..\CustomPane_outlookAddIn\CustomPane_outlookAddIn\bin\$(var.Build)\UtilityClasses.dll" /> 
     <File Id="OneDriveAPI_dll" Name="OneDriveAPI.dll" Source="..\..\CustomPane_outlookAddIn\CustomPane_outlookAddIn\bin\$(var.Build)\OneDriveAPI.dll" /> 
     <File Id="BoxAPI_dll" Name="BoxAPI.dll" Source="..\..\CustomPane_outlookAddIn\CustomPane_outlookAddIn\bin\$(var.Build)\BoxAPI.dll" /> 
     <File Id="ZIP_dll" Name="Ionic.Zip.dll" Source="..\..\CustomPane_outlookAddIn\CustomPane_outlookAddIn\bin\$(var.Build)\Ionic.Zip.dll" /> 
     <File Id="DropBoxAPI_dll" Name="DropBoxLibrary.dll" Source="..\..\CustomPane_outlookAddIn\CustomPane_outlookAddIn\bin\$(var.Build)\DropBoxLibrary.dll" /> 
     <File Id="ProjectFolderOrder_xml" Name="ProjectFolderOrders.xml" Source="..\..\CustomPane_outlookAddIn\Third Party Libs\ProjectFolderOrders.xml" /> 
     <File Id="Outlook_4_Utilities_dll" Name="Microsoft.Office.Tools.Outlook.v4.0.Utilities.dll" Source="..\..\CustomPane_outlookAddIn\CustomPane_outlookAddIn\bin\$(var.Build)\Microsoft.Office.Tools.Outlook.v4.0.Utilities.dll" /> 
     <File Id="Common_4_Utilities_dll" Name="Microsoft.Office.Tools.Common.v4.0.Utilities.dll" Source="..\..\CustomPane_outlookAddIn\CustomPane_outlookAddIn\bin\$(var.Build)\Microsoft.Office.Tools.Common.v4.0.Utilities.dll" /> 
     <!--<File Id="RestSharp_dll" Name="RestSharp.dll" Source="..\..\CustomPane_outlookAddIn\CustomPane_outlookAddIn\bin\$(var.Build)\RestSharp.dll" />--> 
     <File Id="JSON_dll" Name="Newtonsoft.Json.dll" Source="..\..\CustomPane_outlookAddIn\CustomPane_outlookAddIn\bin\$(var.Build)\Newtonsoft.Json.dll" /> 
     <File Id="VSDNETCFG_dll" Name="VSDNETCFG.dll.config" Source=".\Binaryf\VSDNETCFG.dll.config" /> 
     <File Id="CUSTOMPANE_OUTLOOKADDIN_DLL_CONFIG" Name="CustomPane_outlookAddIn.dll.config" Source="..\..\CustomPane_outlookAddIn\CustomPane_outlookAddIn\bin\$(var.Build)\CustomPane_outlookAddIn.dll.config"/> 
     <File Id="shell32_dll" Name="Interop.Shell32.dll" Source="..\..\CustomPane_outlookAddIn\CustomPane_outlookAddIn\bin\$(var.Build)\Interop.Shell32.dll" /> 



     <RegistryValue Root="HKCU" Key="SOFTWARE\Wix\DemoRememberProperty" Name="Remembered" Value="[REMEMBERME]" Type="string" KeyPath="yes"/> 

     <RemoveFolder Id="CleanupApplicationFolder" On="uninstall" /> 
     </Component> 


     <Component Id="CurrentMachineEntry" Guid="*" Directory="TARGETDIR"> 
     <Condition>NOT SETALLUSERS</Condition> 
     <RegistryKey Root="HKCU" Key="Software\Microsoft\Office\Outlook\AddIns\OutlookAddin" Action="createAndRemoveOnUninstall"> 
      <RegistryValue Type="string" Name="Description" Value="[PluginDescription]" /> 
      <RegistryValue Type="string" Name="FriendlyName" Value="[FriendlyName]" /> 
      <RegistryValue Type="integer" Name="LoadBehavior" Value="3" /> 
      <RegistryValue Type="string" Name="Manifest" Value="[INSTALLLOCATION][VSTOName]" /> 
      <RegistryValue Type="string" Name="TEst" Value="[INSTALLLOCATION][VSTOName]" /> 
     </RegistryKey> 
     </Component> 

     <Component Id="LocalMachineEntry" Guid="*" Directory="TARGETDIR" > 
     <Condition > SETALLUSERS AND NOT(OFFICE_2007_32 OR OFFICE_2007_64) </Condition> 
     <RegistryKey Root="HKLM" Key="Software\Microsoft\Office\Outlook\AddIns\OutlookAddin" Action="createAndRemoveOnUninstall"> 
      <RegistryValue Type="string" Name="Description" Value="[PluginDescription]" /> 
      <RegistryValue Type="string" Name="FriendlyName" Value="[FriendlyName]" /> 
      <RegistryValue Type="integer" Name="LoadBehavior" Value="3" /> 
      <RegistryValue Type="string" Name="Manifest" Value="[INSTALLLOCATION][VSTOName]" /> 

     </RegistryKey> 
     </Component> 

    </Feature> 


    <!--Remove older versions but do not overwrite newer versions.--> 
    <Upgrade Id="{B9080C51-8F85-4D5B-9387-DE942A43C985}"> 
     <UpgradeVersion Minimum="1.0.0" Maximum="$(var.ProductVersion)" Property="PREVIOUSVERSIONSINSTALLED" OnlyDetect="no" IncludeMinimum="yes" IncludeMaximum="no"/> 
     <UpgradeVersion Minimum="$(var.ProductVersion)" Property="NEWERPRODUCTFOUND" OnlyDetect="yes" IncludeMinimum="no" /> 
    </Upgrade> 
    <CustomAction Id="CANCELNEWERVERSION" Error="Unable to install because a newer version of this product is already installed." /> 


    <InstallExecuteSequence> 
     <Custom Action="CANCELNEWERVERSION" After="FindRelatedProducts">NEWERPRODUCTFOUND AND NOT Installed</Custom> 
     <RemoveExistingProducts Before="InstallInitialize" /> 

    </InstallExecuteSequence> 

    <!--Check the PRogram File in installation directory path.--> 
    <CustomAction Id="Verify_INSTALLDIR" Script="vbscript"> 
     <![CDATA[ 
      Dim properties 
      properties = Split(Session.Property("INSTALLLOCATION"), "\") 
      If properties(1)="Program Files" Or properties(1)="Program Files (x86)" Then  
       MsgBox "You have selected Program Files as installation base folder." 
      End If 
      ]]> 
    </CustomAction> 
    <CustomAction Id="ALLUSERVerify" Script="vbscript"> 
     <![CDATA[ 
      Dim prop    
      prop = Session.Property("SETALLUSERS") 
      If prop="1" Then  
       MsgBox "You must be an Administrator for this option to install correctly." 
      End If 
      ]]> 
    </CustomAction> 

    <!--Run Installer Class.--> 
    <!--<Binary Id="InstallUtil" SourceFile="$(env.windir)\Microsoft.NET\Framework\v2.0.50727\InstallUtilLib.dll" /> 
    <CustomAction Id="Install" BinaryKey="InstallUtil" DllEntry="ManagedInstall" Execute="deferred" Impersonate="no" />--> 
    <!--<CustomAction Id="InstallSetPro" Property="Install" Value='/installtype=notransaction /action=install /LogFile= /sectionName="Install" /serviceUrl="[SERVICEURL]" "[#CustomPane_outlookAddIn_dll]" "[#VSDNETCFG_dll]"' />--> 
    <!--<CustomAction Id="Uninstall" BinaryKey="InstallUtil" DllEntry="ManagedInstall" Execute="deferred" Impersonate="no" />--> 
    <CustomAction Id="UninstallSetPro" Execute="immediate" Property="SectionName" Value="Uninstall" /> 
    <CustomAction Id="InstallSetPro" Execute="immediate" Property="SectionName" Value="Install" /> 
    <CustomAction Id="Install" Return="check" Execute="immediate" BinaryKey="CustomAction_OutlookPlugin" DllEntry="RegistryInstall" /> 
    <CustomAction Id="Uninstall" Return="check" Execute="immediate" BinaryKey="CustomAction_OutlookPlugin" DllEntry="RegistryInstall" /> 
    <CustomAction Id="CopyOrderingFile" Return="check" Execute="immediate" BinaryKey="CustomAction_OutlookPlugin" DllEntry="CopyOrderingFile" /> 
    <!--<CustomAction Id="CheckForOffice2007" Return="check" Execute="immediate" BinaryKey="CustomAction_OutlookPlugin" DllEntry="isOffice2007" />--> 

    <InstallExecuteSequence> 

     <!--<Custom Action="CheckForOffice2007" Before="AllocateRegistrySpace" >$ProductFiles&gt;2</Custom>--> 
     <Custom Action="InstallSetPro" After="WriteRegistryValues" >$ProductFiles&gt;2</Custom> 
     <Custom Action="Install" After="InstallSetPro">$ProductFiles&gt;2</Custom> 
     <Custom Action="CopyOrderingFile" After="InstallFinalize">NOT Installed</Custom> 
     <!--<Custom Action="UninstallSetPro" After="MsiUnpublishAssemblies">$ProductFiles=2</Custom>--> 
     <Custom Action="UninstallSetPro" After="MsiUnpublishAssemblies" > $ProductFiles=2</Custom> 
     <Custom Action="Uninstall" After="UninstallSetPro">$ProductFiles=2</Custom> 
    </InstallExecuteSequence> 

    <CustomAction Id="SetProductName" Property="ProductName" Value="Outlook Plug-In" Execute="immediate" /> 
    <InstallExecuteSequence> 
     <Custom Action="SetProductName" Before="FindRelatedProducts">1</Custom> 
    </InstallExecuteSequence> 

    <CustomAction Id="CANCELPERUSER" Error="Product with same name already installed with per-machine setting.You are installing with per-user setting which is not allowed.Please uninstall the installed version and retry." /> 
    <CustomAction Id="CANCELALLUSER" Error="Product with same name already installed with per-user setting.You are installing with per-machine setting which is not allowed.Please uninstall the installed version and retry." /> 
    <CustomAction Id="CANCELALLUSERWITHOUT" Error="You need administrative rights to Install with 'ALL Users' setting."/> 

    <CustomAction Id="SETALLUSERSATREMOVE" Property="ALLUSERS" Value="1" Execute="immediate" /> 
    <CustomAction Id="SETPERUSERSATREMOVE" Property="ALLUSERS" Value="{}" Execute="immediate" /> 
    <InstallUISequence> 
     <Custom Action="SETALLUSERSATREMOVE" After="CostFinalize">GETALLUSERS AND Installed</Custom> 
     <Custom Action="SETPERUSERSATREMOVE" After="SETALLUSERSATREMOVE">GETPERUSERS AND Installed</Custom> 
    </InstallUISequence> 

    <UIRef Id="My_InstallDir" /> 
    </Product> 

    <Fragment> 
    <Media Id="1" Cabinet="simple.cab" EmbedCab="yes" /> 
    <Directory Id="TARGETDIR" Name="SourceDir"> 
     <Directory Id="ProgramFilesFolder"> 
     <Directory Id="ABC" Name="AC"> 
      <Directory Id="INSTALLLOCATION" Name="Outlook Plug-In"/> 
     </Directory> 
     </Directory> 
    </Directory> 
    </Fragment> 

</Wix> 
+0

ログを分析したところ、DisplayInternalUI = "no"で正しくアンインストールすると、 "検出されたパッケージ:CMiC_Outlook_Addin.msi、state:Present"が表示されていました。しかし、それが成功しなかった場合は、 "検出されたパッケージ:CMiC_Outlook_Addin.msi、状態:不在"と表示されます。 –

答えて

0

WiXは、アンインストールまたは修復中に内部MSI UIを抑制します。デフォルトでは、基本的なUIが表示されます。ただし、それでも正しくアンインストールする必要があります。

+0

アンインストール中にUIが表示されないことは知っていますが、何らかの理由でアンインストール中にmsiパッケージが検出されませんでした。DisplayInternalUI = "yes" –

+0

問題をもう少し詳細に教えてください。アンインストーラがMSIを正しくアンインストールしていませんか? 'DisplayInternalUI =" yes "'はアンインストールに影響を与えてはいけません。 –

+0

msiを全く呼び出すのではありません。ログにはmsi状態がabsentとして表示されます。しかし、私がdisplayinternalui = noを指定してブートストラップを実行すると、現在の状態が表示されます。 –

関連する問題