Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有 WPF 安装程序的 WiX bootsrapper,根据 Bootsrapper UI 中的用户选择,我想更新一个包含在 msi 中的 sql 脚本。我知道如何读取 Binnary 元素中的文件,但是如何编辑其中一个文件以在 SqlScript 中使用它?我也知道使用 SqlString 的可能性。什么是最合适的解决方案?
您必须通过自定义操作来完成。首先让msi复制sql脚本。之后,您必须执行自定义操作来编辑复制的文件。编辑完成后,您可以执行 sql 脚本。
您无法在 msi 中编辑文件。您唯一能做的就是根据需要将参数传递给 msi,并在应该编辑的地方使用必要的值。