安装期间 XML(.config) 更改(installshield 2010)

发布于 2024-10-10 09:37:50 字数 156 浏览 0 评论 0原文

我正在开发 installshield 2010 应用程序,但“文本文件更改”和“xml 文件更改”不适合修改配置文件(包括 app.config),因为不支持应用条件(如“if”语句)并且使元素(属性) xml 文件中的顺序已修复。

有人可以建议“安装期间配置更改的最佳实践”吗?

I'm developing installshield 2010 application but 'text file change' and 'xml file change' is not good to modifying configuration file(include app.config) because applying condition(like "if" statement) is not supported and make element(attribute) order in xml file fixed.

Could anyone suggest "The Best Practices in configuration change during installation"?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

两人的回忆 2024-10-17 09:37:50

InstallShield 使用 MSXML 进行更新,这是 DOM 的行为。如果这对您来说是不可接受的,那么您将不得不假装它不是 XML 并使用文本更改模式或编写您自己的自定义操作。

既然您询问了“最佳实践”,我会说有效的 XML 就是有效的 XML,如果您担心手动编辑它的人的可读性,那么如果他们不能正确理解 XML,也许他们不应该手动编辑它。

让我想起 1990 年代的一个老笑话,讲的是当用户了解 INI 文件是什么时,他所知道的只是危险的。

多年来一直争论的另一个最佳实践是这种配置是否属于安装程序。我一直这样做,但也有很多人不这样做/不会这样做。他们坚持在应用程序中保留配置;通常在第一次运行时完成。

InstallShield uses MSXML to do it's updates and this is the behavior of the DOM. If this is unacceptable to you, then you will have to either pretend it isn't XML and use the Text Changes pattern or write your own custom actions.

Since you asked about "best practices" I would say that valid XML is valid XML and if you are worried about readability for people editing it by hand that maybe they shouldn't be editing it by hand if they don't properly understand XML.

Reminds me of the old joke back in the 1990's about the user who knew just enough to be dangerous when he learned what an INI file was.

Another best practice that has been debated over the years is whether this sort of configuration even belongs in the installer. I do it all the time but there are many that don't / won't. They insist on keeping configuration in the application; typically done on first run.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文