Wix 如何制作64位MSI?

Wix 如何制作64位MSI?,wix,win64,wix3.11,Wix,Win64,Wix3.11,我已经说明: 运行candle.exe时使用arch x64 软件包上的Platform=x64 ProgramFiles64文件夹作为安装东西的目录id 而且,当安装应用程序时,它会转到C:\ProgramFiles(x86) 还有一些由heat.exe生成的wxs。我尝试将-platform x64和-platform win64添加到对heat.exe的调用中,但没有效果 我读 Wix手册中有关64位安装程序的部分 我想我正在做那里描述的一切 我错过了什么 我提出了一个最低限度

我已经说明:

  • 运行
    candle.exe
    时使用arch x64
  • 软件包上的
    Platform=x64
  • ProgramFiles64文件夹
    作为安装东西的
    目录
    id
而且,当安装应用程序时,它会转到
C:\ProgramFiles(x86)

还有一些由
heat.exe
生成的
wxs
。我尝试将
-platform x64
-platform win64
添加到对
heat.exe
的调用中,但没有效果

我读

  • Wix手册中有关64位安装程序的部分
我想我正在做那里描述的一切

我错过了什么

我提出了一个最低限度的案例,如下所示:

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Product Id="*" Name="Project X" Manufacturer="X LLC" Language="1033" Version="1.0.0.0"
             UpgradeCode="5bf2131c-4068-4cb3-adac-bc9c79ed8ce3">
        <Package InstallerVersion="301" Compressed="yes" InstallScope="perMachine" Platform="x64"/>
        <Property Id="ApplicationFolderName" Value="Project X"/>
        <Property Id="WixAppFolder" Value="WixPerMachineFolder"/>
        <UI>
            <UIRef Id="WixUI_Advanced"/>
        </UI>
    </Product>
</Wix>
 candle.exe -arch x64 -ext WixUIExtension -ext WixUtilExtension ProjectX.wxs

 light.exe -ext WixUIExtension -ext WixUtilExtension -out ProjectX-1.0.0-beta.3-win64.msi ProjectX.wixobj
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
    <Product Id="*" Name="ProjectX" Manufacturer="X Inc" Language="1033"
             Version="$(var.MSIProductVersion)" UpgradeCode="">
        <Package InstallerVersion="301" Compressed="yes" InstallScope="perMachine" Platform="x64"/>

        <MediaTemplate EmbedCab="yes"/>

        <Icon Id="Icon_ProjectX.ico" SourceFile="src\main\installer\ProjectX.ico"/>

        <WixVariable Id="WixUISupportPerUser" Value="0"/>
        <Property Id="ApplicationFolderName" Value="X Inc\ProjectX"/>
        <Property Id="WixAppFolder" Value="WixPerMachineFolder"/>
        <Property Id="ARPPRODUCTICON" Value="Icon_ProjectX.ico"/>
        <WixVariable Id="WixUILicenseRtf" Value="src\main\installer\eula.rtf"/>
        <WixVariable Id="WixUIBannerBmp" Value="src\main\installer\WixUIBannerBmp.bmp"/>
        <WixVariable Id="WixUIDialogBmp" Value="src\main\installer\WixUIDialogBmp.bmp"/>
        <Property Id="AUTO_CONNECT_TO">
            <RegistrySearch Id="AutoConnectTo" Root="HKLM" Key="Software\X Inc\ProjectX" Name="AutoConnectTo"
                            Type="raw"/>
        </Property>
        <Property Id="RUN_ProjectX_ON_EXIT" Value="true"/>
        <Property Id="INSTALL_SCREENSAVER_ON_EXIT" Value="true"/>
        <Property Id="STAGING_DIR" Value="undefined"/>
        <Property Id="ARCH" Value="undefined"/>

        <UI>
            <UIRef Id="DM_WixUI_Advanced"/>

            <Publish Dialog="DM_ExitDialog" Control="Finish" Event="DoAction" Value="CA_Run_ProjectX">
                RUN_ProjectX_ON_EXIT and <![CDATA[&Ftr_Configurator=3]]> and NOT Installed
            </Publish>

            <Publish Dialog="DM_ExitDialog" Control="Finish" Event="DoAction" Value="CA_Install_Screensaver">
                INSTALL_SCREENSAVER_ON_EXIT and <![CDATA[&Ftr_Screensaver=3]]> and NOT Installed
            </Publish>

            <Dialog Id="DM_ExitDialog" Width="370" Height="270" Title="!(loc.ExitDialog_Title)">
                <Control Id="Finish" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Cancel="yes"
                         Text="!(loc.WixUIFinish)"/>
                <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Disabled="yes"
                         Text="!(loc.WixUICancel)"/>
                <Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="234" TabSkip="no"
                         Text="!(loc.ExitDialogBitmap)"/>
                <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Disabled="yes"
                         Text="!(loc.WixUIBack)"/>
                <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0"/>
                <Control Id="Description" Type="Text" X="135" Y="70" Width="220" Height="40" Transparent="yes"
                         NoPrefix="yes"
                         Text="Thank you for choosing ProjectX. We sincerely hope it satisfies your needs."/>
                <Control Id="Title" Type="Text" X="135" Y="20" Width="220" Height="60" Transparent="yes" NoPrefix="yes"
                         Text="!(loc.ExitDialogTitle)"/>
                <Control Id="RunProjectXCheckBox" Type="CheckBox" X="135" Y="150" Width="220" Height="40" Hidden="yes"
                         Property="RUN_ProjectX_ON_EXIT" CheckBoxValue="1" Text="Run ProjectX Configurator">
                    <Condition Action="show"><![CDATA[&Ftr_Configurator=3]]></Condition>
                </Control>
                <Control Id="InstallScreensaverCheckBox" Type="CheckBox" X="135" Y="190" Width="220" Height="40"
                         Hidden="yes" Property="INSTALL_SCREENSAVER_ON_EXIT" CheckBoxValue="1"
                         Text="Install ProjectX as your screensaver">
                    <Condition Action="show"><![CDATA[&Ftr_Screensaver=3]]></Condition>
                </Control>
            </Dialog>

            <InstallUISequence>
                <Show Dialog="DM_ExitDialog" OnExit="success" Overridable="yes"/>
            </InstallUISequence>

            <AdminUISequence>
                <Show Dialog="DM_ExitDialog" OnExit="success" Overridable="yes"/>
            </AdminUISequence>
        </UI>

        <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed."/>

        <Directory Id="TARGETDIR" Name="SourceDir">
            <Directory Id="ProgramFiles64Folder">
                <Directory Id="APPLICATIONFOLDER">
                    <Directory Id="Dir_jre" Name="jre"/>
                    <Directory Id="Dir_jars" Name="jars"/>
                </Directory>
            </Directory>

            <Directory Id="ProgramMenuFolder">
                <Directory Id="Dir_Menu_ProjectX" Name="ProjectX"/>
            </Directory>

            <Component Id="Cmp_Auto_Connect_to" Win64="yes">
                <RegistryValue Root="HKLM" Key="Software\X Inc\ProjectX" Name="AutoConnectTo" Type="string"
                               Value="[AUTO_CONNECT_TO]"/>
            </Component>

            <Directory Id="SystemFolder"/>
        </Directory>

        <DirectoryRef Id="APPLICATIONFOLDER">
            <Component Id="Cmp_ProjectX_Configurator_exe" Guid="" Win64="yes">
                <File Id="File_FT_D_ProjectX_Configurator_exe"
                      Source="$(var.STAGING_DIR)\ProjectX Configurator.exe" KeyPath="yes">
                    <Shortcut Id="Shrt_ProjectX_Configurator" Name="ProjectX Configurator" Directory="Dir_Menu_ProjectX"
                              Advertise="yes" Icon="Icon_ProjectX.ico"/>
                </File>
                <RemoveFolder Id="Rm_Menu_ProjectX_1" Directory="Dir_Menu_ProjectX" On="uninstall"/>
            </Component>
            <Component Id="Cmp_ProjectX_Displayer_exe" Guid="" Win64="yes">
                <File Id="File_FT_D_ProjectX_Displayer_exe" Source="$(var.STAGING_DIR)\ProjectX Displayer.exe"
                      KeyPath="yes">
                    <Shortcut Id="Shrt_ProjectX_Displayer" Name="ProjectX Displayer" Directory="Dir_Menu_ProjectX"
                              Advertise="yes" Icon="Icon_ProjectX.ico"/>
                </File>
                <RemoveFolder Id="Rm_Menu_ProjectX_2" Directory="Dir_Menu_ProjectX" On="uninstall"/>
            </Component>
            <Component Id="Cmp_ProjectX_Renderer_exe" Guid="" Win64="yes">
                <File Id="File_FT_D_ProjectX_Renderer_exe" Source="$(var.STAGING_DIR)\ProjectX Renderer.exe"
                      KeyPath="yes">
                    <Shortcut Id="Shrt_ProjectX_Renderer" Name="ProjectX Renderer" Directory="Dir_Menu_ProjectX"
                              Advertise="yes" Icon="Icon_ProjectX.ico"/>
                </File>
                <RemoveFolder Id="Rm_Menu_ProjectX_3" Directory="Dir_Menu_ProjectX" On="uninstall"/>
            </Component>
            <Component Id="Cmp_Prosaver_scr" Guid="" Win64="yes">
                <File Id="File_FT_D_Prosaver_scr" Source="$(var.STAGING_DIR)\Prosaver.scr" KeyPath="yes"/>
            </Component>
            <Component Id="Cmp_Icon" Guid="" Win64="yes">
                <File Id="File_Icon" Source="src\main\installer\ProjectX.ico" KeyPath="yes"/>
            </Component>
        </DirectoryRef>

        <DirectoryRef Id="Dir_Menu_ProjectX">
            <Component Id="Cmp_Install_Screensaver" Guid="" Win64="yes">
                <Shortcut Id="Shrt_Install_Screensaver" Name="Install ProjectX Screensaver"
                          WorkingDirectory="SystemFolder" Icon="Icon_ProjectX.ico"
                          Target="[SystemFolder]rundll32.exe"
                          Arguments="desk.cpl,InstallScreenSaver [#File_FT_D_Prosaver_scr]"/>
                <RemoveFolder Id="Rm_Menu_ProjectX_4" On="uninstall"/>
                <RegistryValue Root="HKCU" Key="Software\X Inc\ProjectX" Name="installed" Type="integer"
                               Value="1" KeyPath="yes"/>
            </Component>
            <Component Id="Cmp_ProjectX_Support" Guid="" Win64="yes">
                <util:InternetShortcut Id="IShrt_ProjectX_Support" Name="ProjectX Support" IconFile="[#File_Icon]"
                                       Target="https://support.ProjectX.tech"/>
                <RemoveFolder Id="Rm_Menu_ProjectX_5" On="uninstall"/>
                <RegistryValue Root="HKCU" Key="Software\X Inc\ProjectX" Name="installed" Type="integer"
                               Value="1" KeyPath="yes"/>
            </Component>
        </DirectoryRef>

        <CustomAction Id="CA_Run_ProjectX" Directory="APPLICATIONFOLDER" Return="asyncNoWait"
                      ExeCommand="[#File_FT_D_ProjectX_Configurator_exe]"/>
        <CustomAction Id="CA_Install_Screensaver" Directory="SystemFolder" Return="asyncNoWait"
                      ExeCommand="[SystemFolder]rundll32.exe desk.cpl,InstallScreenSaver [#File_FT_D_Prosaver_scr]"/>

        <Feature Id="ProductFeature" Title="ProjectX" Level="1" Display="expand"
                 Description="ProjectX.">
            <ComponentGroupRef Id="ComGrp_JRE"/>
            <ComponentGroupRef Id="ComGrp_JARS"/>
            <ComponentRef Id="Cmp_Auto_Connect_to"/>
            <ComponentRef Id="Cmp_ProjectX_Support"/>
            <ComponentRef Id="Cmp_Icon"/>

            <Feature Id="Ftr_Configurator" Title="Configurator" Level="1"
                     Description="This is the application you use to register a new account as well as configure what websites are displayed, what displayers and renderers have access, etc. You need this in at least one computer to control your account.">
                <ComponentRef Id="Cmp_ProjectX_Configurator_exe"/>
            </Feature>
            <Feature Id="Ftr_Displayer" Title="Displayer" Level="1"
                     Description="This is what displays web sites. You need this (or the screensaver) on all the computers connected to screens that displays web sites.">
                <ComponentRef Id="Cmp_ProjectX_Displayer_exe"/>
            </Feature>
            <Feature Id="Ftr_Renderer" Title="Renderer" Level="1"
                     Description="This accesses your websites and generates the screenshots for the displayers. You need at least one of these although the Configurator can also act as a Renderer.">

                <ComponentRef Id="Cmp_ProjectX_Renderer_exe"/>
            </Feature>
            <Feature Id="Ftr_Screensaver" Title="Screensaver" Level="1"
                     Description="This is what displays web sites as the screensaver. You need this (or the displayer) on all the computers connected to screens that displays web sites.">
                <ComponentRef Id="Cmp_Prosaver_scr"/>
                <ComponentRef Id="Cmp_Install_Screensaver"/>
            </Feature>
        </Feature>
    </Product>
</Wix>
它显然抱怨媒体表为空:

> candle.exe -arch x64 -ext WixUIExtension -ext WixUtilExtension ProjectX.wxs
Windows Installer XML Toolset Compiler version 3.11.0.1701
Copyright (c) .NET Foundation and contributors. All rights reserved.

ProjectX.wxs

> light.exe -ext WixUIExtension -ext WixUtilExtension -out ProjectX-1.0.0-beta.3-win64.msi ProjectX.wixobj
Windows Installer XML Toolset Linker version 3.11.0.1701
Copyright (c) .NET Foundation and contributors. All rights reserved.

C:\Users\pupeno\AppData\Local\Temp\h1k0echv\ProjectX-1.0.0-beta.3-win64.msi : warning LGHT1076 : ICE71: The Media table has no entries.
但是安装程序仍然是生成的,它仍然指向
C:\ProgramFiles(x86)

完整的
.wxs
如下所示:

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Product Id="*" Name="Project X" Manufacturer="X LLC" Language="1033" Version="1.0.0.0"
             UpgradeCode="5bf2131c-4068-4cb3-adac-bc9c79ed8ce3">
        <Package InstallerVersion="301" Compressed="yes" InstallScope="perMachine" Platform="x64"/>
        <Property Id="ApplicationFolderName" Value="Project X"/>
        <Property Id="WixAppFolder" Value="WixPerMachineFolder"/>
        <UI>
            <UIRef Id="WixUI_Advanced"/>
        </UI>
    </Product>
</Wix>
 candle.exe -arch x64 -ext WixUIExtension -ext WixUtilExtension ProjectX.wxs

 light.exe -ext WixUIExtension -ext WixUtilExtension -out ProjectX-1.0.0-beta.3-win64.msi ProjectX.wixobj
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
    <Product Id="*" Name="ProjectX" Manufacturer="X Inc" Language="1033"
             Version="$(var.MSIProductVersion)" UpgradeCode="">
        <Package InstallerVersion="301" Compressed="yes" InstallScope="perMachine" Platform="x64"/>

        <MediaTemplate EmbedCab="yes"/>

        <Icon Id="Icon_ProjectX.ico" SourceFile="src\main\installer\ProjectX.ico"/>

        <WixVariable Id="WixUISupportPerUser" Value="0"/>
        <Property Id="ApplicationFolderName" Value="X Inc\ProjectX"/>
        <Property Id="WixAppFolder" Value="WixPerMachineFolder"/>
        <Property Id="ARPPRODUCTICON" Value="Icon_ProjectX.ico"/>
        <WixVariable Id="WixUILicenseRtf" Value="src\main\installer\eula.rtf"/>
        <WixVariable Id="WixUIBannerBmp" Value="src\main\installer\WixUIBannerBmp.bmp"/>
        <WixVariable Id="WixUIDialogBmp" Value="src\main\installer\WixUIDialogBmp.bmp"/>
        <Property Id="AUTO_CONNECT_TO">
            <RegistrySearch Id="AutoConnectTo" Root="HKLM" Key="Software\X Inc\ProjectX" Name="AutoConnectTo"
                            Type="raw"/>
        </Property>
        <Property Id="RUN_ProjectX_ON_EXIT" Value="true"/>
        <Property Id="INSTALL_SCREENSAVER_ON_EXIT" Value="true"/>
        <Property Id="STAGING_DIR" Value="undefined"/>
        <Property Id="ARCH" Value="undefined"/>

        <UI>
            <UIRef Id="DM_WixUI_Advanced"/>

            <Publish Dialog="DM_ExitDialog" Control="Finish" Event="DoAction" Value="CA_Run_ProjectX">
                RUN_ProjectX_ON_EXIT and <![CDATA[&Ftr_Configurator=3]]> and NOT Installed
            </Publish>

            <Publish Dialog="DM_ExitDialog" Control="Finish" Event="DoAction" Value="CA_Install_Screensaver">
                INSTALL_SCREENSAVER_ON_EXIT and <![CDATA[&Ftr_Screensaver=3]]> and NOT Installed
            </Publish>

            <Dialog Id="DM_ExitDialog" Width="370" Height="270" Title="!(loc.ExitDialog_Title)">
                <Control Id="Finish" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Cancel="yes"
                         Text="!(loc.WixUIFinish)"/>
                <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Disabled="yes"
                         Text="!(loc.WixUICancel)"/>
                <Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="234" TabSkip="no"
                         Text="!(loc.ExitDialogBitmap)"/>
                <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Disabled="yes"
                         Text="!(loc.WixUIBack)"/>
                <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0"/>
                <Control Id="Description" Type="Text" X="135" Y="70" Width="220" Height="40" Transparent="yes"
                         NoPrefix="yes"
                         Text="Thank you for choosing ProjectX. We sincerely hope it satisfies your needs."/>
                <Control Id="Title" Type="Text" X="135" Y="20" Width="220" Height="60" Transparent="yes" NoPrefix="yes"
                         Text="!(loc.ExitDialogTitle)"/>
                <Control Id="RunProjectXCheckBox" Type="CheckBox" X="135" Y="150" Width="220" Height="40" Hidden="yes"
                         Property="RUN_ProjectX_ON_EXIT" CheckBoxValue="1" Text="Run ProjectX Configurator">
                    <Condition Action="show"><![CDATA[&Ftr_Configurator=3]]></Condition>
                </Control>
                <Control Id="InstallScreensaverCheckBox" Type="CheckBox" X="135" Y="190" Width="220" Height="40"
                         Hidden="yes" Property="INSTALL_SCREENSAVER_ON_EXIT" CheckBoxValue="1"
                         Text="Install ProjectX as your screensaver">
                    <Condition Action="show"><![CDATA[&Ftr_Screensaver=3]]></Condition>
                </Control>
            </Dialog>

            <InstallUISequence>
                <Show Dialog="DM_ExitDialog" OnExit="success" Overridable="yes"/>
            </InstallUISequence>

            <AdminUISequence>
                <Show Dialog="DM_ExitDialog" OnExit="success" Overridable="yes"/>
            </AdminUISequence>
        </UI>

        <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed."/>

        <Directory Id="TARGETDIR" Name="SourceDir">
            <Directory Id="ProgramFiles64Folder">
                <Directory Id="APPLICATIONFOLDER">
                    <Directory Id="Dir_jre" Name="jre"/>
                    <Directory Id="Dir_jars" Name="jars"/>
                </Directory>
            </Directory>

            <Directory Id="ProgramMenuFolder">
                <Directory Id="Dir_Menu_ProjectX" Name="ProjectX"/>
            </Directory>

            <Component Id="Cmp_Auto_Connect_to" Win64="yes">
                <RegistryValue Root="HKLM" Key="Software\X Inc\ProjectX" Name="AutoConnectTo" Type="string"
                               Value="[AUTO_CONNECT_TO]"/>
            </Component>

            <Directory Id="SystemFolder"/>
        </Directory>

        <DirectoryRef Id="APPLICATIONFOLDER">
            <Component Id="Cmp_ProjectX_Configurator_exe" Guid="" Win64="yes">
                <File Id="File_FT_D_ProjectX_Configurator_exe"
                      Source="$(var.STAGING_DIR)\ProjectX Configurator.exe" KeyPath="yes">
                    <Shortcut Id="Shrt_ProjectX_Configurator" Name="ProjectX Configurator" Directory="Dir_Menu_ProjectX"
                              Advertise="yes" Icon="Icon_ProjectX.ico"/>
                </File>
                <RemoveFolder Id="Rm_Menu_ProjectX_1" Directory="Dir_Menu_ProjectX" On="uninstall"/>
            </Component>
            <Component Id="Cmp_ProjectX_Displayer_exe" Guid="" Win64="yes">
                <File Id="File_FT_D_ProjectX_Displayer_exe" Source="$(var.STAGING_DIR)\ProjectX Displayer.exe"
                      KeyPath="yes">
                    <Shortcut Id="Shrt_ProjectX_Displayer" Name="ProjectX Displayer" Directory="Dir_Menu_ProjectX"
                              Advertise="yes" Icon="Icon_ProjectX.ico"/>
                </File>
                <RemoveFolder Id="Rm_Menu_ProjectX_2" Directory="Dir_Menu_ProjectX" On="uninstall"/>
            </Component>
            <Component Id="Cmp_ProjectX_Renderer_exe" Guid="" Win64="yes">
                <File Id="File_FT_D_ProjectX_Renderer_exe" Source="$(var.STAGING_DIR)\ProjectX Renderer.exe"
                      KeyPath="yes">
                    <Shortcut Id="Shrt_ProjectX_Renderer" Name="ProjectX Renderer" Directory="Dir_Menu_ProjectX"
                              Advertise="yes" Icon="Icon_ProjectX.ico"/>
                </File>
                <RemoveFolder Id="Rm_Menu_ProjectX_3" Directory="Dir_Menu_ProjectX" On="uninstall"/>
            </Component>
            <Component Id="Cmp_Prosaver_scr" Guid="" Win64="yes">
                <File Id="File_FT_D_Prosaver_scr" Source="$(var.STAGING_DIR)\Prosaver.scr" KeyPath="yes"/>
            </Component>
            <Component Id="Cmp_Icon" Guid="" Win64="yes">
                <File Id="File_Icon" Source="src\main\installer\ProjectX.ico" KeyPath="yes"/>
            </Component>
        </DirectoryRef>

        <DirectoryRef Id="Dir_Menu_ProjectX">
            <Component Id="Cmp_Install_Screensaver" Guid="" Win64="yes">
                <Shortcut Id="Shrt_Install_Screensaver" Name="Install ProjectX Screensaver"
                          WorkingDirectory="SystemFolder" Icon="Icon_ProjectX.ico"
                          Target="[SystemFolder]rundll32.exe"
                          Arguments="desk.cpl,InstallScreenSaver [#File_FT_D_Prosaver_scr]"/>
                <RemoveFolder Id="Rm_Menu_ProjectX_4" On="uninstall"/>
                <RegistryValue Root="HKCU" Key="Software\X Inc\ProjectX" Name="installed" Type="integer"
                               Value="1" KeyPath="yes"/>
            </Component>
            <Component Id="Cmp_ProjectX_Support" Guid="" Win64="yes">
                <util:InternetShortcut Id="IShrt_ProjectX_Support" Name="ProjectX Support" IconFile="[#File_Icon]"
                                       Target="https://support.ProjectX.tech"/>
                <RemoveFolder Id="Rm_Menu_ProjectX_5" On="uninstall"/>
                <RegistryValue Root="HKCU" Key="Software\X Inc\ProjectX" Name="installed" Type="integer"
                               Value="1" KeyPath="yes"/>
            </Component>
        </DirectoryRef>

        <CustomAction Id="CA_Run_ProjectX" Directory="APPLICATIONFOLDER" Return="asyncNoWait"
                      ExeCommand="[#File_FT_D_ProjectX_Configurator_exe]"/>
        <CustomAction Id="CA_Install_Screensaver" Directory="SystemFolder" Return="asyncNoWait"
                      ExeCommand="[SystemFolder]rundll32.exe desk.cpl,InstallScreenSaver [#File_FT_D_Prosaver_scr]"/>

        <Feature Id="ProductFeature" Title="ProjectX" Level="1" Display="expand"
                 Description="ProjectX.">
            <ComponentGroupRef Id="ComGrp_JRE"/>
            <ComponentGroupRef Id="ComGrp_JARS"/>
            <ComponentRef Id="Cmp_Auto_Connect_to"/>
            <ComponentRef Id="Cmp_ProjectX_Support"/>
            <ComponentRef Id="Cmp_Icon"/>

            <Feature Id="Ftr_Configurator" Title="Configurator" Level="1"
                     Description="This is the application you use to register a new account as well as configure what websites are displayed, what displayers and renderers have access, etc. You need this in at least one computer to control your account.">
                <ComponentRef Id="Cmp_ProjectX_Configurator_exe"/>
            </Feature>
            <Feature Id="Ftr_Displayer" Title="Displayer" Level="1"
                     Description="This is what displays web sites. You need this (or the screensaver) on all the computers connected to screens that displays web sites.">
                <ComponentRef Id="Cmp_ProjectX_Displayer_exe"/>
            </Feature>
            <Feature Id="Ftr_Renderer" Title="Renderer" Level="1"
                     Description="This accesses your websites and generates the screenshots for the displayers. You need at least one of these although the Configurator can also act as a Renderer.">

                <ComponentRef Id="Cmp_ProjectX_Renderer_exe"/>
            </Feature>
            <Feature Id="Ftr_Screensaver" Title="Screensaver" Level="1"
                     Description="This is what displays web sites as the screensaver. You need this (or the displayer) on all the computers connected to screens that displays web sites.">
                <ComponentRef Id="Cmp_Prosaver_scr"/>
                <ComponentRef Id="Cmp_Install_Screensaver"/>
            </Feature>
        </Feature>
    </Product>
</Wix>
我也以同样的方式在两台不同的计算机上失败(安装到
C:\ProgramFiles(x86)

如果我将
目录
更改为
ProgramFilesFolder
而不是
ProgramFiles64文件夹
,则会得到预期的错误:

error LGHT0204 : ICE80: This 64BitComponent cmpCBBF8379128F087B61BD92F8113C95D6 uses 32BitDirectory dir451F8F132CB17CBF5649679474428CE4
以防万一,我打开注册表编辑器,删除了所有提到的
C:\ProgramFiles(x86)\X LCC
。这没有什么区别:(

我尝试为目录指定一个名称,作为一个实验:

<Directory Id="ProgramFiles64Folder" Name="Program Files">


这也没什么区别。

您的目录表是什么样子的?您使用的是ProgramFilesFolder还是ProgramFilesFolder64

您还需要将组件标记为64位。由于媒体表正在抱怨,我猜您还没有任何组件数据。

非常匆忙:在已编译的MSI中,可能首先尝试更改
自定义操作
表中的以下条目(编译后使用Orca进行热修复):

更改

  • WixSetDefaultPerMachineFolder,51,WixPerMachineFolder,[ProgramFilesFolder],[ApplicationFolderName]
进入

  • WixSetDefaultPerMachineFolder,51,WixPerMachineFolder,[ProgramFiles64文件夹,],ApplicationFolderName]

我没有时间正确测试上述内容,但如果您查看
CustomAction表
,您将看到
WixSetDefaultPerMachineFolder
分配
[ProgramFilesFolder][ApplicationFolderName]
WixPerMachineFolder
。然后在ControlEvent表中使用
WixAppFolder=“WixPerMachineFolder”执行大量操作
等…相当混乱。然后看起来WixPerMachineFolder被分配到了
APPLICATIONFOLDER
。对话框中使用的实际属性似乎是
WIXUI\u INSTALLDIR
。现在无法跟踪它-请尝试上面的简单方法(只需将路径设置为ProgramFiles64文件夹)-它可能会强制提交路径。然后在所有安装模式(安装、修复、自修复、修改、卸载、主要升级、修补程序、管理员安装等)下测试整个过程


抱歉这么匆忙,祝你好运。

我正在使用
ProgramFiles64文件夹
,我将所有组件标记为
Win64=“是”
。我用这些东西重新添加了我完整的
wxs
文件。你看过使用ORCA的MSI吗?摘要信息流说平台是什么?我没有,因为我找不到ORCA的安装程序…或者更确切地说,我找到了一个应该有它的安装程序,但在我的机器上找不到它。如果我到这里,请跟随我他链接下载它,我最终在WindowsSDK中运行Windows7 32位(我运行的是Windows10,64位)。我信任的非官方下载源:只是为了确保没有人碰巧修改你目标机器上的%ProgramFiles%位置,对吗?@Isaiah4110:好主意……我检查了,结果是正确的。我用这些信息更新了问题。这背后似乎有一些自定义操作。请参阅下面我的匆忙尝试。你是对的,这就是问题所在!还有这是因为这句话:我仍在试验,但看起来合适的解决方案应该是这样的:
老实说,我发现高级对话框集非常令人困惑。我通常使用Mondo,但我记得它对于您的目的是不可接受的。