4

我有一个 WiX 包,安装后应用程序启动:

<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch MyProgram" />
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1" />
<Property Id="WixShellExecTarget" Value="[#MainExe]" />
<CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />

我想将 WiX 包的语言传递给我的程序。可能吗?

4

1 回答 1

9

有用:

<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch" />
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1" />
<Property Id="LANGUAGE" Admin="yes" />

<CustomAction Id="LaunchApplication"
   FileKey="MainExe"
   ExeCommand="[LANGUAGE]"
   Execute="immediate"
   Impersonate="yes"
   Return="asyncNoWait" />

<!-- icon for add/remove programs -->
<Property Id="ARPPRODUCTICON" Value="ProgramIcon.exe" />

<!-- Интерфейс пользователя (подключается отдельной сборкой) -->
<UI Id="MyWixUI_Mondo">
  <UIRef Id="WixUI_Minimal" />
  <Publish Dialog="ExitDialog" Control="Finish" Event="DoAction" Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>
  <UIRef Id="WixUI_ErrorProgressText"/>
</UI>
于 2013-07-14T08:32:10.760 回答