WiX:命令提示符的快捷方式不完整

时间:2014-07-18 21:59:04

标签: windows batch-file wix windows-installer wix3.7

我有以下快捷键定义:

<Directory Id="TARGETDIR" Name="SourceDir">
    <Directory Id="ProgramFiles64Folder">
        <Directory Id="INSTALLFOLDER" Name="InGenius">
            <Directory Id="APPLICATIONFODLER" Name="ICE Publisher" />
        </Directory>
    </Directory>
    <Directory Id="ProgramMenuFolder">
        <Directory Id="CompanyFolder" Name="InGenius">
            <Directory Id="AppFolder" Name="ICE Publisher" />
        </Directory>
    </Directory>
</Directory>
<DirectoryRef Id="AppFolder">
  <Component Id="ApplicationShortcut" Guid="*">
    <Shortcut Id="ApplicationStartMenuShortcut"
              Name="App CMD Prompt"
              Target="[SystemFolder]CMD.exe"
              Arguments="/K [APPLICATIONFOLDER]app.bat"
              WorkingDirectory="APPLICATIONFOLDER"
              Show="normal"/>
    <RemoveFolder Id="CompanyFolder" Directory="CompanyFolder"
                  On="uninstall" />
    <RemoveFolder Id="AppFolder" On="uninstall" />
    <RegistryValue Root="HKCU" 
                   Key="Software\Microsoft\InGenius ICE Publisher" 
                   Name="installed" Type="integer" Value="1" KeyPath="yes" />
  </Component>
</DirectoryRef>

我得到了一个包含以下目标的快捷方式:

C:\Windows\SysWOW64\cmd.exe /K app.bat

Start in:字段中没有任何内容。

我期待的目标是:

C:\Windows\SysWOW64\cmd.exe /K c:\ProgramFiles\appfolder\app.bat

并且

c:\ProgramFiles\appfolder\app.bat

Start in:字段

我做错了什么?

1 个答案:

答案 0 :(得分:2)

看起来没有设置APPLICATIONFOLDER属性。在调试日志中检查其值,并在安装开始之前设置APPLICATIONFOLDER属性的值。