gpt4 book ai didi

WIX : File Association : How to include app name and product info?

转载 作者:行者123 更新时间:2023-12-04 23:20:59 24 4
gpt4 key购买 nike

使用 Wix,我已经弄清楚如何使用 ProgId 注册文件关联,但在资源管理器中,当您单击“打开方式...”或“选择程序...”时,我只会看到我的应用程序 EXE 文件名。

如何更改它以显示不带 EXE 文件扩展名的应用程序名称?

此外,我注意到其他已注册的应用程序在其应用程序名称下有灰色的公司名称等信息(例如 Microsoft 或 Document Foundation,如下图所示)。它是如何添加的?

下面是一些图片:

enter image description here

enter image description here

这是我完整的 wix.xml:

<Icon Id="icon.ico" SourceFile="jedit.ico"/>
<Property Id="ARPPRODUCTICON" Value="icon.ico"/>

<!-- Step 1: Define the directory structure -->
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="APPLICATIONROOTDIRECTORY" Name="jedit"/>
</Directory>
<Directory Id="ProgramMenuFolder">
</Directory>
</Directory>

<!-- Step 2: Add files to your installer package -->
<DirectoryRef Id="APPLICATIONROOTDIRECTORY">
<Component Id="appfiles" Guid="{E73254A5-EFE2-4265-A231-B907FEF4B4C4}">
<File Id="jedit.jar" Source="jedit.jar"/>
<File Id="javaforce.jar" Source="javaforce.jar"/>
<File Id="jedit32.exe" Source="jedit32.exe" KeyPath="yes"/>
<File Id="jedit64.exe" Source="jedit64.exe"/>
<ProgId Id="jfEdit.txt" Description="Text Document" Advertise="yes" Icon="icon.ico">
<Extension Id="txt" ContentType="text/plain">
<Verb Id="open" Command="Open" Argument="&quot;%1&quot;" />
</Extension>
</ProgId>
<ProgId Id="jfEdit.ini" Description="Configuration Settings" Advertise="yes" Icon="icon.ico">
<Extension Id="ini" ContentType="text/plain">
<Verb Id="open" Command="Open" Argument="&quot;%1&quot;" />
</Extension>
</ProgId>
<ProgId Id="jfEdit.properties" Description="Properties" Advertise="yes" Icon="icon.ico">
<Extension Id="properties" ContentType="text/plain">
<Verb Id="open" Command="Open" Argument="&quot;%1&quot;" />
</Extension>
</ProgId>
</Component>
</DirectoryRef>

<!-- Step 2b: Add the shortcut to your installer package -->
<DirectoryRef Id="ProgramMenuFolder">
<Component Id="ApplicationShortcut" Guid="{A986E325-13AB-4FD1-AB3B-4637DF9BC1D9}">
<Shortcut Id="ApplicationStartMenuShortcut" Name="jfEdit" Description="Java Text Editor" Target="[APPLICATIONROOTDIRECTORY]jedit32.exe"
WorkingDirectory="APPLICATIONROOTDIRECTORY"/>
<RegistryValue Root="HKCU" Key="Software\Microsoft\jfEdit" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</DirectoryRef>

<!-- Step 3: Tell WiX to install the files -->
<Feature Id="MainApplication" Title="Main Application" Level="1">
<ComponentRef Id="appfiles" />
<ComponentRef Id="ApplicationShortcut" />
</Feature>

最佳答案

看看this response来自@saschabeaumont,它应该包含所有涉及的注册表项。 打开方式... 中显示的名称是名称为 FriendlyAppName 的注册表项。文件的打开方式... 上下文菜单条目中显示的那个在注册表项中

HKLM\SOFTWARE\Classes\<YourProgId>\shell\open\FriendlyAppName

我发现这两个不同,但只是黑了我的注册表。如果您使用链接答案的整个示例,它可能会完美运行。

第二行据我所知是 Windows Installer 中的 Manufacturer 属性。一旦应用程序正确注册,它也应该显示在打开方式...对话框中。

关于WIX : File Association : How to include app name and product info?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23830410/

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