簡體   English   中英

WIX安裝程序:使用自定義操作設置其他文本以退出對話框

[英]WIX installer: set additional text to exit dialog using custom action

我正在使用wix安裝ASP.NET MVC網站。 我需要在退出屏幕上顯示已安裝網站的URL。

我有以下屬性:

<Property Id="WEBSITE_URL" Value="NotSet" />
<Property Id="WIXUI_EXITDIALOGOPTIONALTEXT" Value="NotSet" />

使用自定義操作填充的內容:

<CustomAction Id="GetWebsiteUrl"
              BinaryKey="CustomActions"
              DllEntry="GetWebsiteUrl"
              Execute="immediate"
              Return="ignore" />

<CustomAction Id="SetExitDialogAdditionalText"
              Property="WIXUI_EXITDIALOGOPTIONALTEXT" 
              Value="The API may be accessed from the following URL: [WEBSITE_URL]"/>

InstallUISequence如下:

<InstallUISequence>
      <Custom Action='GetWebsiteUrl' Before='ExecuteAction'>NOT Installed AND NOT REMOVE</Custom>
      <Custom Action="SetExitDialogAdditionalText" After="GetWebsiteUrl">NOT Installed AND NOT REMOVE</Custom>
</InstallUISequence>

退出屏幕上的結果字符串是:

可以從以下URL訪問API: NotSet

我試圖在InstallExecuteSequence中執行自定義操作,在日志中我可以看到該字符串看起來正確:

<InstallExecuteSequence>
      <Custom Action='GetWebsiteUrl' Before='InstallFinalize'>NOT Installed AND NOT REMOVE</Custom>
      <Custom Action="SetExitDialogAdditionalText" After="GetWebsiteUrl">NOT Installed AND NOT REMOVE</Custom>
</InstallExecuteSequence>

日志中的結果:

PROPERTY CHANGE:修改WEBSITE_URL屬性。 它的當前值是'NotSet'。 它的新值:' http:// localhost:80 '。

PROPERTY CHANGE:修改WIXUI_EXITDIALOGOPTIONALTEXT屬性。 它的當前值是'NotSet'。 它的新值:'可以從以下URL訪問API: http:// localhost:80 '。

但在UI中出現問題。 我覺得問題出現在InstallUISequence中,但無法理解我做錯了什么。 請指教。

如果未在UI和執行序列中正確保存值,請嘗試將WEBSITE_URL屬性聲明為安全。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM