我的Wix项目只在添加/删除时显示给我,而不是其他人?

时间:2015-03-04 19:08:09

标签: wix windows-installer

我们一直在使用Wix创建我们的网站msi一段时间,它安装得很好。

问题(小烦恼) - 如果我安装了我的msi,它将显示在添加/删除程序中,但如果人员B进入服务器,我的msi条目将不会在添加/删除程序中显示。

我假设它是wix product.wxs页面中设置的属性,但谷歌在这方面对我不友好。

我不确定它是否只是一个win2k3问题,但我们只是对win2k8R2进行了测试,并且发生了同样的问题。

这是我的product.wxs文件

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:iis="http://schemas.microsoft.com/wix/IIsExtension">

 <Product Id="*"
      Name="!(loc.ProductName)"
      Language="!(loc.LANG)"
      Version="1.0.0.0"
      Manufacturer="!(loc.CompanyName)"
      UpgradeCode="1bf00ad4-a8a1-407b-8a07-0d3046cb7214">
<Package InstallerVersion="200" Compressed="yes" Manufacturer="!(loc.CompanyName)" Description="!(loc.Description)" />

<?include Settings.wxi ?>
<?include Conditions.wxi ?>
<?include WebSites.wxi ?>

<iis:WebAppPool Id="AppPool" Name="[APP_POOL_NAME]"/>

<Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="IISMain" Name='WebSites'>
    <Directory Id="WWWMain" Name='SigappsTest'
               ComponentGuidGenerationSeed='5A8C3E4A-0AA2-488C-80EC-91921A1A36CC'>
      <Directory Id='INSTALLLOCATION' Name='!(loc.VirtualDirectory)'>
        <!-- The component to define the Virtual Directory.-->
        <Component Id="WebVirtualDirComponent" Guid="8AD62CCC-3FD5-4121-8370-DFB466482E61">

          <iis:WebVirtualDir Id="VDir" Alias="[VD]" Directory="INSTALLLOCATION"  WebSite="SelectedWebSite">
            <iis:WebApplication Id="MyWebAppApplication" WebAppPool="AppPool" Name="[VD]" />
          </iis:WebVirtualDir>
          <CreateFolder/>
          <!-- Need to have to ensure created -->
        </Component>

        <Component Id="EnableASPNet4Extension" Permanent="yes" Guid="73FA6E54-2B0C-4AA7-A2A0-BDD432FECC62">
          <CreateFolder/>
        </Component>

        <Component Id="PersistWebSiteValues" Guid="F249ADCB-B638-4E2B-9350-0421CEC5A803">
          <RegistryKey Action="create" Root="HKLM" Key="SOFTWARE\!(loc.CompanyName)\!(loc.VirtualDirectory)\Install">
            <RegistryValue Name="WebSiteDescription" Type="string" Value="[WEBSITE_DESCRIPTION]"/>
            <RegistryValue Name="WebSiteID" Type="string" Value="[WEBSITE_ID]"/>
            <RegistryValue Name="WebSitePath" Type="string" Value="[WEBSITE_PATH]"/>
            <RegistryValue Name="WebSiteVD" Type="string" Value="[VD]"/>
            <RegistryValue Name="WebSiteAppPoolName" Type="string" Value="[APP_POOL_NAME]"/>
          </RegistryKey>
        </Component>
      </Directory>
    </Directory>
  </Directory>
</Directory>

<iis:WebSite Id='SelectedWebSite' Description='[WEBSITE_DESCRIPTION]' Directory='INSTALLLOCATION' SiteId='[WEBSITE_ID]'>
  <!-- This element has to be here or WiX does not compile. -->
  <iis:WebAddress Id="AllUnassigned" Port="80"/>
</iis:WebSite>

<!-- Define our custom actions -->
<Binary Id="IISCA" SourceFile="$(var.IISCA.TargetDir)$(var.IISCA.TargetName).CA.dll" />
<CustomAction Id="GetIISWebSites" BinaryKey="IISCA" DllEntry="GetWebSites" Execute="immediate" Return="check" />
<CustomAction Id="UpdatePropsWithSelectedWebSite" BinaryKey="IISCA" DllEntry="UpdatePropsWithSelectedWebSite" Execute="immediate" Return="check" />
<CustomAction Id="UpdateWebConfigFile" BinaryKey="IISCA" DllEntry="UpdateWebConfig" Execute="immediate" Return="check" />
<CustomAction Id="RegisterScriptMaps" BinaryKey="IISCA" DllEntry="RegisterScriptMaps" Execute="immediate" Return="check" />
<CustomAction Id="SetApplicationRootDirectory" Directory="INSTALLLOCATION" Value="[WEBSITE_PATH]\[VD]" />

<!-- Install UI Sequence - allows us to schedule custom action -->
<InstallUISequence>
  <Custom Action="GetIISWebSites" After="CostFinalize" Overridable="yes">NOT Installed</Custom>
</InstallUISequence>

<InstallExecuteSequence>
  <Custom Action="GetIISWebSites" After="CostFinalize" Overridable="yes">NOT Installed</Custom>
  <Custom Action="UpdatePropsWithSelectedWebSite"  After="GetIISWebSites">NOT Installed</Custom>
  <Custom Action="SetApplicationRootDirectory"  After="UpdatePropsWithSelectedWebSite">NOT Installed</Custom>
  <Custom Action="UpdateWebConfigFile" After="InstallFinalize">NOT Installed</Custom>
  <!--<Custom Action="UpdateWebAppMapping" After="InstallFinalize">NOT Installed</Custom>-->
  <Custom Action="RegisterScriptMaps" After="InstallFinalize">NOT Installed</Custom>
</InstallExecuteSequence>

<Feature Id="ProductFeature" Title="!(loc.ProductName)" Level="1">
  <ComponentRef Id='WebVirtualDirComponent' />
  <ComponentRef Id='EnableASPNet4Extension'/>
  <!--<ComponentGroupRef Id="WebSecurity.Web_Project" />-->
  <ComponentGroupRef Id="Product.Generated" />
  <ComponentRef Id="PersistWebSiteValues" />
</Feature>

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


   <UIRef Id="WixUI_WebUI" />

  </Product>
</Wix>

1 个答案:

答案 0 :(得分:2)

Package/@InstallScope属性设置为perMachine。 Windows Installer中的默认设置是创建每用户包。