组策略应用程序部署的日志文件
我正在考虑使用组策略来部署几个应用程序。我希望将每个安装的日志写入文件服务器上的共享文件夹以进行跟踪。
如果传递适当的参数,我可以创建日志。例如: msiexec /i Package.msi /l*vx c:\Package.log
但是,使用组策略进行部署时,您无法将任何参数传递到安装文件。
在创建 msi 包的过程中是否可以指定日志文件位置?
I'm looking into using group policy to deploy a couple of applications. I want to have the log of each installation written to a shared folder on a file server for tracking purposes.
I can create the log if I pass the appropriate parameters. For example: msiexec /i Package.msi /l*vx c:\Package.log
However using group policy for the deployment, you can't pass any parameters to the installation file.
Is there anyway to specify the log file location in the process of creating the msi package?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我昨天刚刚在 MS Security Essentials msi 中看到属性:MsiLogFileLocation
使用 Orca 创建转换并通过在将 msi 添加到组策略对象时选择“高级”来应用它。
转换可能还需要存在 MsiLogging 属性,尽管我在 msse.msi 中没有看到这一点。我还没有用其他东西测试过它。似乎需要 Windows Installer 4.5。
MsiLogging 属性:
msdn.microsoft /en-us/library/aa370322%28VS.85%29.aspx
MsiLogFileLocation:
msdn.microsoft /en-us/library/aa370321%28VS.85%29.aspx
Orca:
technipages /download-orca-msi-editor.html
(我无法发布超链接,因此请自行添加 .com)
I just saw yesterday in the MS Security Essentials msi, the property: MsiLogFileLocation
Use Orca to create a transform and apply it by choosing "advanced" when adding the msi to the group policy object.
The transform probably also needs the MsiLogging property present, though I didn't see this with msse.msi. I haven't tested it with anything else. Seems to require Windows Installer 4.5.
MsiLogging property:
msdn.microsoft /en-us/library/aa370322%28VS.85%29.aspx
MsiLogFileLocation:
msdn.microsoft /en-us/library/aa370321%28VS.85%29.aspx
Orca:
technipages /download-orca-msi-editor.html
(I can't post hyperlinks, so add .com to them yourself)
在目标计算机上创建此注册表项:
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Installer
Reg_SZ:日志记录
值:voicewarmupx
这将为系统上运行的每个 MSI 创建一个日志文件。生成的日志名为 MSI###.log(其中“###”是唯一的随机标识符),并放置在系统的 Temp 目录中。
要查看日志,请单击“开始/运行”,键入“%TEMP%”。
值字段中的字母可以按任意顺序排列。每个字母都会开启不同的记录模式。对于 MSI 版本 1.1,每个字母的功能如下:
此时您可以从 %TEMP% 获取日志文件并将其复制到您的共享。
另请考虑:
通过修改组策略启用 Windows Installer 日志记录
对于 MS 知识库文章:
http://support.microsoft.com/kb/314852
Create this registry key on the target computers:
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Installer
Reg_SZ: Logging
Value: voicewarmupx
This will create a logfile for every MSI run on the system. The resulting log is named MSI###.log (where "###" is a unique random identifier) and is placed in the system's Temp directory.
To see the log, click Start/Run, type "%TEMP%"
The letters in the value field can be in any order. Each letter turns on a different logging mode. Each letter's function is as follows for MSI version 1.1:
At this point you can grab the log file from %TEMP% and copy it to your share.
Also consider:
Enable Windows Installer Logging by Modifying Group Policy
For the MS KB article:
http://support.microsoft.com/kb/314852