Setting working directory for a WiX shortcut

半腔热情 提交于 2019-12-06 04:36:33

You don't need to say [INSTALLLOCATION] because the ShortCut table defines the WkDir column describes "The name of the property that has the path of the working directory for the shortcut."

I would reccomend trying this:

<Directory Id="ProgramMenuFolder"> 
  <Directory Id="ApplicationProgramsFolder" Name="My Name"> 
  </Directory> 
</Directory> 

<!-- Install the app. --> 
<Directory Id="ProgramFilesFolder"> 
  <Directory Id="INSTALLLOCATION" Name="My Name"> 
    <Component Id="ProductComponent" Guid="4740357A-69D3-4626-A0F7-D0667C93A2CE"> 
      <File Id="My.exe" Name="My.exe" Source="My.exe" />
        <Shortcut Id="ApplicationStartMenuShortcut" 
                  Advertise="yes"
                  Name="My Name" 
                  Description="My Description" 
                  Directory="ApplicationProgramsFolder"
                  WorkingDirectory="INSTALLLOCATION">
          <Icon Id="My.exe" SourceFile="My.exe" />
        <Shortcut>
    </Component> 
  </Directory> 
</Directory> 

I think you need square brackets around your INSTALLLOCATION in the working directory attribute.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!