我是否需要MSIUSEREALADMINDETECTION用于这个带有COM DLL注册的WIX配置?



我有一个COM DLL的WIX安装设置,在没有MSIUSEREALADMINDETECTION值设置为1的情况下似乎可以正常工作。但是,我不确定它是否适用于所有配置(Windows版本,. net版本等)。

你会包括("属性Id="MSIUSEREALADMINDETECTION"值="1")在我的WIX配置文件只是100%确定MSI将注册COM DLL正确在所有角落的情况下?

据我所知,此属性将强制安装程序以"真正的"管理权限运行。

这是一个企业应用程序,所以安装顺利是非常重要的。

WIX文件:

  <?xml version="1.0" encoding="UTF-8"?>

<!-- <Property Id="MSIUSEREALADMINDETECTION" Value="1" /> unsure if this is needed yet -->
<Property Id="ARPHELPLINK" Value="http://www.example.com" />
<Property Id="ARPURLINFOABOUT" Value="http://www.example.com" />    
<PropertyRef Id="NETFRAMEWORK40FULL" />
<PropertyRef Id="NETFRAMEWORK40CLIENT" />
<Condition Message="This application requires .NET Framework 4.0 or later. Please install the .NET Framework 4.0 or later and then run this installer again.">
  <![CDATA[Installed OR NETFRAMEWORK40FULL OR NETFRAMEWORK40CLIENT]]>
</Condition>
<WixVariable Id="WixUIDialogBmp" Value="InstallerBackgroundWix.bmp" />
<WixVariable Id="WixUIBannerBmp" Value="InstallerBannerWix.bmp" />

<Fragment>
    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="ProgramFilesFolder">
    <Directory Id="INSTALLFOLDER" Name="example">
      <Component Id="MyAddin" Guid="guid3" Win64="no">
        <File Id="exampleDLL" Source="$(var.example.TargetDir)example.dll"/>
        <Class Id="{guid4}" Context="InprocServer32" Description="example" ThreadingModel="both" ForeignServer="mscoree.dll">
          <ProgId Id="example" Description="example" />
        </Class>
        <RegistryValue Root="HKCR" Key="CLSID{guid4}Implemented Categories{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}" Value="" Type="string" Action="write" />
        <RegistryValue Root="HKCR" Key="CLSID{guid4}InprocServer321.0.0.0" Name="Class" Value="example.Addin" Type="string" Action="write" />
        <RegistryValue Root="HKCR" Key="CLSID{guid4}InprocServer321.0.0.0" Name="Assembly" Value="example, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" Type="string" Action="write" />
        <RegistryValue Root="HKCR" Key="CLSID{guid4}InprocServer321.0.0.0" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
        <RegistryValue Root="HKCR" Key="CLSID{guid4}InprocServer321.0.0.0" Name="CodeBase" Value="file:///[#exampleDLL]" Type="string" Action="write" />
        <RegistryValue Root="HKCR" Key="CLSID{guid4}InprocServer32" Name="Class" Value="example.Addin" Type="string" Action="write" />
        <RegistryValue Root="HKCR" Key="CLSID{guid4}InprocServer32" Name="Assembly" Value="example, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" Type="string" Action="write" />
        <RegistryValue Root="HKCR" Key="CLSID{guid4}InprocServer32" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
        <RegistryValue Root="HKCR" Key="CLSID{guid4}InprocServer32" Name="CodeBase" Value="file:///[#exampleDLL]" Type="string" Action="write" />
        <RegistryKey Root="HKLM" Key="SOFTWAREMicrosoftOfficeOutlookAddinsexample">
          <RegistryValue Type="integer" Name="LoadBehavior" Value="3"/>
          <RegistryValue Type="string" Name="Description" Value="example Outlook Add-in"/>
          <RegistryValue Type="string" Name="FriendlyName" Value="example Outlook Add-in"/>
        </RegistryKey>
      </Component>
    </Directory>
        </Directory>
    </Directory>
</Fragment>

不,不要用它。它不会给安装更多的特权去做任何事情。这是一个遗留设置,它使旧的MSI安装能够获得UAC之前的特权和AdminUser值。换句话说,如果您在UI序列中询问AdminUser属性的值(在UAC提示之前),如果设置了MSIUSEREALADMINDETECTION,它将告诉您"true",如果没有设置则告诉您"false"(这被认为是正确的答案,因为没有提升提示,所以用户怎么可能是Admin?)。

最好在Mark MSI处回答,所以它必须作为提升的管理员帐户运行

总结:一个不同之处在于它改变了运行CustomActions的用户凭据