[英]WIX installer: set additional text to exit dialog using custom action
I am installing ASP.NET MVC website using wix. 我正在使用wix安装ASP.NET MVC网站。 I need to show the URL of installed site on the exit screen.
我需要在退出屏幕上显示已安装网站的URL。
I have following properties: 我有以下属性:
<Property Id="WEBSITE_URL" Value="NotSet" />
<Property Id="WIXUI_EXITDIALOGOPTIONALTEXT" Value="NotSet" />
Which are populated using custom actions: 使用自定义操作填充的内容:
<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 is following: 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>
And the result string on exit screen is: 退出屏幕上的结果字符串是:
The API may be accessed from the following URL: NotSet
可以从以下URL访问API: NotSet
I've tried to execute custom actions in the InstallExecuteSequence and in the logs I can see that string looks correct: 我试图在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>
The result in logs: 日志中的结果:
PROPERTY CHANGE: Modifying WEBSITE_URL property.
PROPERTY CHANGE:修改WEBSITE_URL属性。 Its current value is 'NotSet'.
它的当前值是'NotSet'。 Its new value: ' http://localhost:80 '.
它的新值:' http:// localhost:80 '。
PROPERTY CHANGE: Modifying WIXUI_EXITDIALOGOPTIONALTEXT property.
PROPERTY CHANGE:修改WIXUI_EXITDIALOGOPTIONALTEXT属性。 Its current value is 'NotSet'.
它的当前值是'NotSet'。 Its new value: 'The API may be accessed from the following URL: http://localhost:80 '.
它的新值:'可以从以下URL访问API: http:// localhost:80 '。
But in UI something is going wrong. 但在UI中出现问题。 I feel like the problem is in the InstallUISequence, but can't understand what I'm doing wrong.
我觉得问题出现在InstallUISequence中,但无法理解我做错了什么。 Please advise.
请指教。
如果未在UI和执行序列中正确保存值,请尝试将WEBSITE_URL属性声明为安全。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.