How to Read a string From a File Wix

自古美人都是妖i 提交于 2019-12-25 01:53:56

问题


There is a file test.txt which is having a text "FileName"

I want to read this string "FileName" from the file test.txt in wix and somehow I want to assign this string to a directory name.

I want the below mentioned to happen, reading from a file.

< Directory Id="testing" Name=FileName >

Any suggestions would be helpful.

Thanks in Advance, Pradeep Kumar.


回答1:


You need to have a custom action that reads the text file content and places it into a property. Then you can try to reference that property in the directory name, don't know if WiX supports this, but other setup authoring tools do so chances are WiX does too.

VERY IMPORTANT. You must schedule the custom action to be executed as immediate and before the file costing standard actions.



来源:https://stackoverflow.com/questions/19241971/how-to-read-a-string-from-a-file-wix

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