2016-07-07 1 views
0

UI가 모두 포함 된 기존 wix msi 프로젝트가 있습니다. 나는 wix 번들을 생성하고이 부트 스트 래퍼 프로젝트에서 msi 프로젝트를 참조했다. 이는 msi를 완벽하게 설치하지만 msi를 호출하지는 않는다. DisplayInternalUI = "yes"(msi 패키지). 그러나 DisplayInternalUI = "no" msi, msi 패키지를 호출하여 올바르게 제거합니다.이 문제를 해결하는 방법. 설치 중에 msi UI를 표시하려면 DisplayInternalUI를 No로 설정할 수 없습니다. 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"이고 올바르게 제거되면 "Detected package : CMiC_Outlook_Addin.msi, state : Present"가 표시된다는 것을 알았습니다. 그러나 성공하지 못하면 "Detected package : CMiC_Outlook_Addin.msi, state : Absent"가 표시됩니다. –

답변

0

WiX는 제거 또는 복구 중에 내부 MSI UI를 표시하지 않습니다. 기본적으로 기본 UI가 표시됩니다. 그러나 여전히 올바르게 제거되어야합니다.

+0

제거하는 동안 UI가 표시되지 않는다는 것을 알고 있습니다.하지만, 어떤 이유로 인하여 제거하는 동안 msi 패키지를 감지하지 못합니다. DisplayInternalUI = "yes" –

+0

문제에 대해 좀 더 자세히 설명해 주시겠습니까? 제거 프로그램이 MSI를 올바르게 제거하지 않습니까? 'DisplayInternalUI = "yes"'는 제거에 영향을 미치지 않습니다. –

+0

msi를 전혀 호출하지 않고 있습니다. 로그에는 msi 상태가 부재로 표시됩니다. 그러나 bootinstoolpper를 displayinternalui = no로 실행하면 현재 상태가 표시됩니다. –

관련 문제