Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在WIX中显示浏览对话框_Wix_Windows Installer_Wix3.5 - Fatal编程技术网

在WIX中显示浏览对话框

在WIX中显示浏览对话框,wix,windows-installer,wix3.5,Wix,Windows Installer,Wix3.5,我想用WIX在屏幕上显示浏览按钮 <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" /> <Property Id="INSTALLLOCATION" Value="C:\Program Files" /> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder">

我想用WIX在屏幕上显示浏览按钮

    <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<Property Id="INSTALLLOCATION" Value="C:\Program Files" />

    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="ProgramFilesFolder">
    <Directory Id="APPLICATIONFOLDER" Name="My Program" >
                <!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
                 <Component Id="ProductComponent" Guid="595b18ae-6a72-412e-9b0e-f2893ca9fdf5">
         <File Id="SampleFile" Name="File.txt" Source="D:\links.txt"/>
                 </Component> 
            </Directory>
        </Directory>
    </Directory>

<Property Id="ApplicationFolderName" Value="My Program" />
<Property Id="WixAppFolder" Value="WixPerMachineFolder" />

<Feature Id="ProductFeature" Title="WixProject1" Level="1">
        <!-- TODO: Remove the comments around this ComponentRef element and the Component above in order to add resources to this installer. -->
         <ComponentRef Id="ProductComponent" /> 
    </Feature>

<Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" />
<UIRef Id="WixUI_InstallDir" />
<UIRef Id="WixUI_ErrorProgressText" />

<WixVariable Id="WixUILicenseRtf" Value="Files\License.rtf" />
<WixVariable Id="WixUIBannerBmp" Value="Bitmaps\bannrbmp.bmp" Overridable="no"/>
<WixVariable Id="WixUIDialogBmp" Value="Bitmaps\dlgbmp.bmp" Overridable="no"/>
<WixVariable Id="WixUIExclamationIco" Value="Bitmaps\exclamic.ico" Overridable="no"/>
<WixVariable Id="WixUIInfoIco" Value="Bitmaps\info.ico" Overridable="no"/>
<WixVariable Id="WixUINewIco" Value="Bitmaps\New.ico" Overridable="no"/>
<WixVariable Id="WixUIUpIco" Value="Bitmaps\Up.ico" Overridable="no"/>

</Product>
我想要这样

    <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<Property Id="INSTALLLOCATION" Value="C:\Program Files" />

    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="ProgramFilesFolder">
    <Directory Id="APPLICATIONFOLDER" Name="My Program" >
                <!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
                 <Component Id="ProductComponent" Guid="595b18ae-6a72-412e-9b0e-f2893ca9fdf5">
         <File Id="SampleFile" Name="File.txt" Source="D:\links.txt"/>
                 </Component> 
            </Directory>
        </Directory>
    </Directory>

<Property Id="ApplicationFolderName" Value="My Program" />
<Property Id="WixAppFolder" Value="WixPerMachineFolder" />

<Feature Id="ProductFeature" Title="WixProject1" Level="1">
        <!-- TODO: Remove the comments around this ComponentRef element and the Component above in order to add resources to this installer. -->
         <ComponentRef Id="ProductComponent" /> 
    </Feature>

<Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" />
<UIRef Id="WixUI_InstallDir" />
<UIRef Id="WixUI_ErrorProgressText" />

<WixVariable Id="WixUILicenseRtf" Value="Files\License.rtf" />
<WixVariable Id="WixUIBannerBmp" Value="Bitmaps\bannrbmp.bmp" Overridable="no"/>
<WixVariable Id="WixUIDialogBmp" Value="Bitmaps\dlgbmp.bmp" Overridable="no"/>
<WixVariable Id="WixUIExclamationIco" Value="Bitmaps\exclamic.ico" Overridable="no"/>
<WixVariable Id="WixUIInfoIco" Value="Bitmaps\info.ico" Overridable="no"/>
<WixVariable Id="WixUINewIco" Value="Bitmaps\New.ico" Overridable="no"/>
<WixVariable Id="WixUIUpIco" Value="Bitmaps\Up.ico" Overridable="no"/>

</Product>

    <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<Property Id="INSTALLLOCATION" Value="C:\Program Files" />

    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="ProgramFilesFolder">
    <Directory Id="APPLICATIONFOLDER" Name="My Program" >
                <!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
                 <Component Id="ProductComponent" Guid="595b18ae-6a72-412e-9b0e-f2893ca9fdf5">
         <File Id="SampleFile" Name="File.txt" Source="D:\links.txt"/>
                 </Component> 
            </Directory>
        </Directory>
    </Directory>

<Property Id="ApplicationFolderName" Value="My Program" />
<Property Id="WixAppFolder" Value="WixPerMachineFolder" />

<Feature Id="ProductFeature" Title="WixProject1" Level="1">
        <!-- TODO: Remove the comments around this ComponentRef element and the Component above in order to add resources to this installer. -->
         <ComponentRef Id="ProductComponent" /> 
    </Feature>

<Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" />
<UIRef Id="WixUI_InstallDir" />
<UIRef Id="WixUI_ErrorProgressText" />

<WixVariable Id="WixUILicenseRtf" Value="Files\License.rtf" />
<WixVariable Id="WixUIBannerBmp" Value="Bitmaps\bannrbmp.bmp" Overridable="no"/>
<WixVariable Id="WixUIDialogBmp" Value="Bitmaps\dlgbmp.bmp" Overridable="no"/>
<WixVariable Id="WixUIExclamationIco" Value="Bitmaps\exclamic.ico" Overridable="no"/>
<WixVariable Id="WixUIInfoIco" Value="Bitmaps\info.ico" Overridable="no"/>
<WixVariable Id="WixUINewIco" Value="Bitmaps\New.ico" Overridable="no"/>
<WixVariable Id="WixUIUpIco" Value="Bitmaps\Up.ico" Overridable="no"/>

</Product>
我能够得到浏览按钮使用功能树,但由于我没有多个功能,我想要的确切形象

    <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<Property Id="INSTALLLOCATION" Value="C:\Program Files" />

    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="ProgramFilesFolder">
    <Directory Id="APPLICATIONFOLDER" Name="My Program" >
                <!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
                 <Component Id="ProductComponent" Guid="595b18ae-6a72-412e-9b0e-f2893ca9fdf5">
         <File Id="SampleFile" Name="File.txt" Source="D:\links.txt"/>
                 </Component> 
            </Directory>
        </Directory>
    </Directory>

<Property Id="ApplicationFolderName" Value="My Program" />
<Property Id="WixAppFolder" Value="WixPerMachineFolder" />

<Feature Id="ProductFeature" Title="WixProject1" Level="1">
        <!-- TODO: Remove the comments around this ComponentRef element and the Component above in order to add resources to this installer. -->
         <ComponentRef Id="ProductComponent" /> 
    </Feature>

<Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" />
<UIRef Id="WixUI_InstallDir" />
<UIRef Id="WixUI_ErrorProgressText" />

<WixVariable Id="WixUILicenseRtf" Value="Files\License.rtf" />
<WixVariable Id="WixUIBannerBmp" Value="Bitmaps\bannrbmp.bmp" Overridable="no"/>
<WixVariable Id="WixUIDialogBmp" Value="Bitmaps\dlgbmp.bmp" Overridable="no"/>
<WixVariable Id="WixUIExclamationIco" Value="Bitmaps\exclamic.ico" Overridable="no"/>
<WixVariable Id="WixUIInfoIco" Value="Bitmaps\info.ico" Overridable="no"/>
<WixVariable Id="WixUINewIco" Value="Bitmaps\New.ico" Overridable="no"/>
<WixVariable Id="WixUIUpIco" Value="Bitmaps\Up.ico" Overridable="no"/>

</Product>
有人能在这方面指导我吗

    <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<Property Id="INSTALLLOCATION" Value="C:\Program Files" />

    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="ProgramFilesFolder">
    <Directory Id="APPLICATIONFOLDER" Name="My Program" >
                <!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
                 <Component Id="ProductComponent" Guid="595b18ae-6a72-412e-9b0e-f2893ca9fdf5">
         <File Id="SampleFile" Name="File.txt" Source="D:\links.txt"/>
                 </Component> 
            </Directory>
        </Directory>
    </Directory>

<Property Id="ApplicationFolderName" Value="My Program" />
<Property Id="WixAppFolder" Value="WixPerMachineFolder" />

<Feature Id="ProductFeature" Title="WixProject1" Level="1">
        <!-- TODO: Remove the comments around this ComponentRef element and the Component above in order to add resources to this installer. -->
         <ComponentRef Id="ProductComponent" /> 
    </Feature>

<Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" />
<UIRef Id="WixUI_InstallDir" />
<UIRef Id="WixUI_ErrorProgressText" />

<WixVariable Id="WixUILicenseRtf" Value="Files\License.rtf" />
<WixVariable Id="WixUIBannerBmp" Value="Bitmaps\bannrbmp.bmp" Overridable="no"/>
<WixVariable Id="WixUIDialogBmp" Value="Bitmaps\dlgbmp.bmp" Overridable="no"/>
<WixVariable Id="WixUIExclamationIco" Value="Bitmaps\exclamic.ico" Overridable="no"/>
<WixVariable Id="WixUIInfoIco" Value="Bitmaps\info.ico" Overridable="no"/>
<WixVariable Id="WixUINewIco" Value="Bitmaps\New.ico" Overridable="no"/>
<WixVariable Id="WixUIUpIco" Value="Bitmaps\Up.ico" Overridable="no"/>

</Product>
这是我正在使用的代码

<?xml version="1.0" encoding="UTF-8"?>
    <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<Property Id="INSTALLLOCATION" Value="C:\Program Files" />

    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="ProgramFilesFolder">
    <Directory Id="APPLICATIONFOLDER" Name="My Program" >
                <!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
                 <Component Id="ProductComponent" Guid="595b18ae-6a72-412e-9b0e-f2893ca9fdf5">
         <File Id="SampleFile" Name="File.txt" Source="D:\links.txt"/>
                 </Component> 
            </Directory>
        </Directory>
    </Directory>

<Property Id="ApplicationFolderName" Value="My Program" />
<Property Id="WixAppFolder" Value="WixPerMachineFolder" />

<Feature Id="ProductFeature" Title="WixProject1" Level="1">
        <!-- TODO: Remove the comments around this ComponentRef element and the Component above in order to add resources to this installer. -->
         <ComponentRef Id="ProductComponent" /> 
    </Feature>

<Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" />
<UIRef Id="WixUI_InstallDir" />
<UIRef Id="WixUI_ErrorProgressText" />

<WixVariable Id="WixUILicenseRtf" Value="Files\License.rtf" />
<WixVariable Id="WixUIBannerBmp" Value="Bitmaps\bannrbmp.bmp" Overridable="no"/>
<WixVariable Id="WixUIDialogBmp" Value="Bitmaps\dlgbmp.bmp" Overridable="no"/>
<WixVariable Id="WixUIExclamationIco" Value="Bitmaps\exclamic.ico" Overridable="no"/>
<WixVariable Id="WixUIInfoIco" Value="Bitmaps\info.ico" Overridable="no"/>
<WixVariable Id="WixUINewIco" Value="Bitmaps\New.ico" Overridable="no"/>
<WixVariable Id="WixUIUpIco" Value="Bitmaps\Up.ico" Overridable="no"/>

</Product>

    <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<Property Id="INSTALLLOCATION" Value="C:\Program Files" />

    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="ProgramFilesFolder">
    <Directory Id="APPLICATIONFOLDER" Name="My Program" >
                <!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
                 <Component Id="ProductComponent" Guid="595b18ae-6a72-412e-9b0e-f2893ca9fdf5">
         <File Id="SampleFile" Name="File.txt" Source="D:\links.txt"/>
                 </Component> 
            </Directory>
        </Directory>
    </Directory>

<Property Id="ApplicationFolderName" Value="My Program" />
<Property Id="WixAppFolder" Value="WixPerMachineFolder" />

<Feature Id="ProductFeature" Title="WixProject1" Level="1">
        <!-- TODO: Remove the comments around this ComponentRef element and the Component above in order to add resources to this installer. -->
         <ComponentRef Id="ProductComponent" /> 
    </Feature>

<Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" />
<UIRef Id="WixUI_InstallDir" />
<UIRef Id="WixUI_ErrorProgressText" />

<WixVariable Id="WixUILicenseRtf" Value="Files\License.rtf" />
<WixVariable Id="WixUIBannerBmp" Value="Bitmaps\bannrbmp.bmp" Overridable="no"/>
<WixVariable Id="WixUIDialogBmp" Value="Bitmaps\dlgbmp.bmp" Overridable="no"/>
<WixVariable Id="WixUIExclamationIco" Value="Bitmaps\exclamic.ico" Overridable="no"/>
<WixVariable Id="WixUIInfoIco" Value="Bitmaps\info.ico" Overridable="no"/>
<WixVariable Id="WixUINewIco" Value="Bitmaps\New.ico" Overridable="no"/>
<WixVariable Id="WixUIUpIco" Value="Bitmaps\Up.ico" Overridable="no"/>

</Product>

    <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<Property Id="INSTALLLOCATION" Value="C:\Program Files" />

    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="ProgramFilesFolder">
    <Directory Id="APPLICATIONFOLDER" Name="My Program" >
                <!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
                 <Component Id="ProductComponent" Guid="595b18ae-6a72-412e-9b0e-f2893ca9fdf5">
         <File Id="SampleFile" Name="File.txt" Source="D:\links.txt"/>
                 </Component> 
            </Directory>
        </Directory>
    </Directory>

<Property Id="ApplicationFolderName" Value="My Program" />
<Property Id="WixAppFolder" Value="WixPerMachineFolder" />

<Feature Id="ProductFeature" Title="WixProject1" Level="1">
        <!-- TODO: Remove the comments around this ComponentRef element and the Component above in order to add resources to this installer. -->
         <ComponentRef Id="ProductComponent" /> 
    </Feature>

<Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" />
<UIRef Id="WixUI_InstallDir" />
<UIRef Id="WixUI_ErrorProgressText" />

<WixVariable Id="WixUILicenseRtf" Value="Files\License.rtf" />
<WixVariable Id="WixUIBannerBmp" Value="Bitmaps\bannrbmp.bmp" Overridable="no"/>
<WixVariable Id="WixUIDialogBmp" Value="Bitmaps\dlgbmp.bmp" Overridable="no"/>
<WixVariable Id="WixUIExclamationIco" Value="Bitmaps\exclamic.ico" Overridable="no"/>
<WixVariable Id="WixUIInfoIco" Value="Bitmaps\info.ico" Overridable="no"/>
<WixVariable Id="WixUINewIco" Value="Bitmaps\New.ico" Overridable="no"/>
<WixVariable Id="WixUIUpIco" Value="Bitmaps\Up.ico" Overridable="no"/>

</Product>
这就是我得到的错误

    <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<Property Id="INSTALLLOCATION" Value="C:\Program Files" />

    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="ProgramFilesFolder">
    <Directory Id="APPLICATIONFOLDER" Name="My Program" >
                <!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
                 <Component Id="ProductComponent" Guid="595b18ae-6a72-412e-9b0e-f2893ca9fdf5">
         <File Id="SampleFile" Name="File.txt" Source="D:\links.txt"/>
                 </Component> 
            </Directory>
        </Directory>
    </Directory>

<Property Id="ApplicationFolderName" Value="My Program" />
<Property Id="WixAppFolder" Value="WixPerMachineFolder" />

<Feature Id="ProductFeature" Title="WixProject1" Level="1">
        <!-- TODO: Remove the comments around this ComponentRef element and the Component above in order to add resources to this installer. -->
         <ComponentRef Id="ProductComponent" /> 
    </Feature>

<Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" />
<UIRef Id="WixUI_InstallDir" />
<UIRef Id="WixUI_ErrorProgressText" />

<WixVariable Id="WixUILicenseRtf" Value="Files\License.rtf" />
<WixVariable Id="WixUIBannerBmp" Value="Bitmaps\bannrbmp.bmp" Overridable="no"/>
<WixVariable Id="WixUIDialogBmp" Value="Bitmaps\dlgbmp.bmp" Overridable="no"/>
<WixVariable Id="WixUIExclamationIco" Value="Bitmaps\exclamic.ico" Overridable="no"/>
<WixVariable Id="WixUIInfoIco" Value="Bitmaps\info.ico" Overridable="no"/>
<WixVariable Id="WixUINewIco" Value="Bitmaps\New.ico" Overridable="no"/>
<WixVariable Id="WixUIUpIco" Value="Bitmaps\Up.ico" Overridable="no"/>

</Product>

您是否查阅了本教程的第8.4节?或者你正在找人为你粘贴一个现成的XML?我希望几乎是这样,只是功能树不应该出现。
    <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<Property Id="INSTALLLOCATION" Value="C:\Program Files" />

    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="ProgramFilesFolder">
    <Directory Id="APPLICATIONFOLDER" Name="My Program" >
                <!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
                 <Component Id="ProductComponent" Guid="595b18ae-6a72-412e-9b0e-f2893ca9fdf5">
         <File Id="SampleFile" Name="File.txt" Source="D:\links.txt"/>
                 </Component> 
            </Directory>
        </Directory>
    </Directory>

<Property Id="ApplicationFolderName" Value="My Program" />
<Property Id="WixAppFolder" Value="WixPerMachineFolder" />

<Feature Id="ProductFeature" Title="WixProject1" Level="1">
        <!-- TODO: Remove the comments around this ComponentRef element and the Component above in order to add resources to this installer. -->
         <ComponentRef Id="ProductComponent" /> 
    </Feature>

<Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" />
<UIRef Id="WixUI_InstallDir" />
<UIRef Id="WixUI_ErrorProgressText" />

<WixVariable Id="WixUILicenseRtf" Value="Files\License.rtf" />
<WixVariable Id="WixUIBannerBmp" Value="Bitmaps\bannrbmp.bmp" Overridable="no"/>
<WixVariable Id="WixUIDialogBmp" Value="Bitmaps\dlgbmp.bmp" Overridable="no"/>
<WixVariable Id="WixUIExclamationIco" Value="Bitmaps\exclamic.ico" Overridable="no"/>
<WixVariable Id="WixUIInfoIco" Value="Bitmaps\info.ico" Overridable="no"/>
<WixVariable Id="WixUINewIco" Value="Bitmaps\New.ico" Overridable="no"/>
<WixVariable Id="WixUIUpIco" Value="Bitmaps\Up.ico" Overridable="no"/>

</Product>