views:

117

answers:

2

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?

A: 

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)

A: 

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:

v - Verbose output
o - Out-of-disk-space messages
i - Status messages
c - Initial UI parameters
e - All error messages
w - Non-fatal warnings
a - Startup of actions
r - Action-specific records
m - Out-of-memory or fatal exit information
u - User requests
p - Terminal properties
+ - Append to existing file
! - Flush each line to the log
"*" - Wildcard, log all information except for the v option. To include the v option, specify "/l*v".

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

You can use Group Policy to enable logging by modifying the appropriate organizational unit (OU) or Active Directory Group Policy: Click Start, and then click Run. In the Open box, type gpedit.msc to start the Group Policy Editor. Expand Computer Configuration, expand Administrative Templates, expand Windows Components, and then click Windows Installer. Double-click Logging, and then click Enabled. In the Logging box, specify the options for what you want to log. The log file, Msi.log, appears in the Temp folder of the system volume.

For the MS KB article:
http://support.microsoft.com/kb/314852

William Leara

related questions