Microsoft Office 2007 自动安装 - 编辑 config.xml 文件
我正在创建 Office 2007 的自动安装。要自定义 Office 2007 安装,Office 自定义工具 (OCT) 会为您完成大部分工作。 OCT 的功能之一是能够在 Office 安装期间运行其他程序。 然而它在这方面相当差。
幸运的是,通过编辑安装程序文件中包含的相应 config.xml
文件,您可以更好地控制这些附加程序的运行。 在 config.xml
文件中,此功能由 command
元素定义。 TechNet 上的此链接对此进行了全部讨论。
在本文档中,它指出:
Attributes
You can specify double-quotation marks (") in the Path and Args attributes by specifying two double-quotation marks together ("").
<Command Path="myscript.exe" Args="/id ""123 abc"" /q" />
我想在我希望传递给我正在执行的命令的参数中使用双引号。 不幸的是,当我按照示例中所示配置 config.xml
文件时,Office 2007 安装程序崩溃并在安装日志中显示以下错误消息:
Parsing config.xml at: \\aumel1pc356\c$\Documents and Settings\nichollsd2\Desktop\source\office\Enterprise.WW\config.xml
Error: XML document load failed for file: \\aumel1pc356\c$\Documents and Settings\nichollsd2\Desktop\source\office\Enterprise.WW\config.xml HResult: 0x1.
有人有此问题的经验吗? 我很想从另一个角度来看待它。
I'm creating an automated installation of Office 2007. To customise your Office 2007 installation the Office Customization Tool (OCT) does most of the work for you. One the OCT's features is the ability to run additional programs during the Office installation. However it is pretty poor at it.
Fortunately by editing the appropiate config.xml
file contained within the installer files you have more control over running these additional programs. Within the config.xml
file this feature is defined by the command
element. This link on TechNet talks all about it.
In this documentation it states:
Attributes
You can specify double-quotation marks (") in the Path and Args attributes by specifying two double-quotation marks together ("").
<Command Path="myscript.exe" Args="/id ""123 abc"" /q" />
I would like to use double-quotation marks in an argument that I wish to pass to the command I'm executing. Unfortunately when I configure my config.xml
file as shown in the example, the Office 2007 installer crashes and displays the following error message in the setup logs:
Parsing config.xml at: \\aumel1pc356\c$\Documents and Settings\nichollsd2\Desktop\source\office\Enterprise.WW\config.xml
Error: XML document load failed for file: \\aumel1pc356\c$\Documents and Settings\nichollsd2\Desktop\source\office\Enterprise.WW\config.xml HResult: 0x1.
Does anyone have any experience with this issue? I'd love to get another perspective on it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在标准 XML 中,您可以使用
"
、&34;
或在属性值中嵌入引号。
有关 XML 实体引用的列表,请参阅 Wikipedia 上的页面。
我不知道这是否能解决您的问题,但鉴于它是 XML 解析器错误,它应该可以解决。
In standard XML you embed quotes in attribute values using
"
,&34;
or.
See the page on Wikipedia for a list of XML entity references.
I don't know if this will solve your problem, but seeing as it is an XML parser error it should.