加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

xml – Wix安装程序错误2343

发布时间:2020-12-15 23:58:06 所属栏目:百科 来源:网络整理
导读:所以我一直在尝试为我的应用程序开发这个安装程序.我决定将我的GUI更改为 UIRef Id =“WixUI_InstallDir”/.根据我正在阅读的教程,我还需要包含 Property Id =“WIXUI_INSTALLDIR”Value =“TOP_LEVEL_DIR”/如果我使用那个GUI但是,由于我更改了GUI并添加了
所以我一直在尝试为我的应用程序开发这个安装程序.我决定将我的GUI更改为< UIRef Id =“WixUI_InstallDir”/>.根据我正在阅读的教程,我还需要包含< Property Id =“WIXUI_INSTALLDIR”Value =“TOP_LEVEL_DIR”/>如果我使用那个GUI但是,由于我更改了GUI并添加了这一行,我收到了一个错误(2343).我也在下面发布了MSI日志,它抱怨一个位置?

错误:
MSI(c)(CC:84)[13:27:33:140]:注意:1:2343
调试:错误2343:指定的路径为空.
安装程序在安装此程序包时遇到意外错误.这可能表明此包装存在问题.错误代码是2343.参数是:,
MSI(c)(CC:84)[13:27:34:663]:产品:Viewer 1.0 – 安装程序在安装此软件包时遇到意外错误.这可能表明此包装存在问题.错误代码是2343.参数是:,

Action ended 13:27:34: WelcomeDlg. Return value 3.
MSI (c) (CC:DC) [13:27:34:672]: Doing action: FatalError
Action 13:27:34: FatalError. 
Action start 13:27:34: FatalError.
Action 13:27:34: FatalError. Dialog created
Action ended 13:27:36: FatalError. Return value 2.
Action ended 13:27:36: INSTALL. Return value 3.

码:

<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
  <Product Name='Viewer 1.0' Id='*' UpgradeCode='PUT-GUID-HERE'
    Language='1033' Codepage='1252' Version='1.0.0' Manufacturer='Direct'>
    <Package Id='*' Keywords='Installer' Description="Viewer Installer"
      Comments='Installer is a registered trademark.' Manufacturer='Direct'
      InstallerVersion='100' Languages='1033' Compressed='yes' 
      SummaryCodepage='1252' />

    <Media Id='1' Cabinet='Sample.cab' EmbedCab='yes' DiskPrompt="CD-ROM #1" />
    <Property Id='DiskPrompt' Value="1.0 Installation [1]" />
    <Property Id="WIXUI_INSTALLDIR" Value="TOP_LEVEL_DIR" />

    <Directory Id='TARGETDIR' Name='SourceDir'>
      <Directory Id='ProgramFilesFolder' Name='PFiles'>
        <Directory Id='Direct' Name='DMD'>
          <Directory Id='INSTALLDIR' Name='Viewer'>

            <Component Id='MainExecutable' Guid='*'>
              <Shortcut Id="startmenuViewer" Directory="ProgramMenuDir" 
                        Name="Viewer" WorkingDirectory='INSTALLDIR' 
                        Icon="Viewer.exe" IconIndex="0" Advertise="yes" />
              <Shortcut Id="desktopViewer" Directory="DesktopFolder" 
                        Name="Viewer" WorkingDirectory='INSTALLDIR' 
                        Icon="Viewer.exe" IconIndex="0" Advertise="yes" />

              <File Id='EXE' Name='Viewer.exe' DiskId='1' 
                    Source='Viewer.exe' KeyPath='yes'>
              </File>
                <ProgId Id="DMDCCDAV" Description="Viewer">
                   <Extension Id="xml" >
                    <Verb Id="open" Argument="&quot;%1&quot;" 
                          TargetFile="EXE" />
                   </Extension>
                </ProgId>
            </Component>

          </Directory>
        </Directory>
      </Directory>

      <Directory Id="ProgramMenuFolder" Name="Programs">
        <Directory Id="ProgramMenuDir" Name="Viewer">
          <Component Id="ProgramMenuDir" Guid="*">
            <RemoveFolder Id='ProgramMenuDir' On='uninstall' />
            <RegistryValue Root='HKCU' 
                           Key='Software[Manufacturer][ProductName]' 
                           Type='string' Value='' KeyPath='yes' />
          </Component>
        </Directory>
      </Directory>

      <Directory Id="DesktopFolder" Name="Desktop" />
    </Directory>

    <Feature Id='Complete' Title='Viewer Installation' 
             Display='expand' Level='1' ConfigurableDirectory='INSTALLDIR'>
    <Feature Id='MainProgram' Title='Viewer Program' 
             Description='The main executable.' Level='1'>
      <ComponentRef Id='MainExecutable' />
      <ComponentRef Id='ProgramMenuDir' />
    </Feature>
    </Feature>

    <UIRef Id="WixUI_InstallDir" />
    <UIRef Id="WixUI_ErrorProgressText" />

    <Icon Id="Viewer.exe" SourceFile="Viewer.exe" />

  </Product>
</Wix>
< Property Id =“WIXUI_INSTALLDIR”Value =“TOP_LEVEL_DIR”/>的值是您指定允许用户使用UI对话框设置的内容.在这种情况下,您将TOP_LEVEL_DIR标识为您希望用户设置的目录的ID,但您没有将其映射到任何相应的Directory标记.

假设您尝试允许它们更改根安装目录,请尝试将WIXUI_INSTALLDIR的值从TOP_LEVEL_DIR设置为INSTALLDIR.

有关详细信息,请参阅this reference.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读