gpt4 book ai didi

dll - 对于带有 COM DLL 注册的 WIX 配置,我是否需要 MSIUSEREALADMINDETECTION?

转载 作者:行者123 更新时间:2023-12-02 21:24:33 25 4
gpt4 key购买 nike

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

您是否可以在我的 WIX 配置文件中包含 ("Property Id="MSIUSEREALADMINDETECTION"Value="1"),以便 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}\InprocServer32\1.0.0.0" Name="Class" Value="example.Addin" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{guid4}\InprocServer32\1.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}\InprocServer32\1.0.0.0" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{guid4}\InprocServer32\1.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="SOFTWARE\Microsoft\Office\Outlook\Addins\example">
<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 之前一样获取 Privileged 和 AdminUser 值。换句话说,如果您询问 UI 序列中 AdminUser 属性的值(在 UAC 提示之前),如果设置了 MSIUSEREALADMINDETECTION,它会告诉您“true”,如果没有设置,则会告诉您“false”(这被认为是正确答案,因为没有提升权限提示,那么用户如何成为管理员?)。

关于dll - 对于带有 COM DLL 注册的 WIX 配置,我是否需要 MSIUSEREALADMINDETECTION?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25452354/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com