且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用DOM在inno安装程序中将节点添加到xml - 奇怪的问题

更新时间:2023-11-25 07:49:57

最后,似乎没有什么办法摆脱这个混乱,我最终只是做一个外部应用来做我的XML编辑。用于进行xml更改的工具被简单地提取到程序文件夹中,并在具有正确参数的Run和UninstallRun部分中设置。

In the end, there didn't seem to be any way out of this mess, and I ended up simply making an external app to do my XML edits. The tool for making the xml changes was simply extracted to the program folder, and set in the Run and UninstallRun sections with the correct parameters.

(需要使用UninstallRun部件,因为要编辑的XML是需要与我们的应用程序集成的外部应用程序的一部分。显然,如果您处于这种情况,但需要在自己的程序中进行xml编辑,只需将应用程序解压缩到{tmp}并运行一旦从那里应该是足够的)

(the UninstallRun part was needed because the XML to edit was part of an external app that needed to be integrated with our app. Obviously, if you're in this situation but need it for xml edits in your own program, simply extracting the app into {tmp} and running it once from there should be enough)

如果有人曾经弄清楚什么使COM COM失败,但是请添加另一个答案。不过,在制作外部应用程序时,它可能与XML树中的命名空间的变化有关。

If anyone ever figures out what makes this COM mess fail, though, please do add another Answer. From what I ran into when making the external app, though, it is probably related to the change in namespace halfway in the XML tree.