views:

193

answers:

1

I would like to monitor what applications get installed by the windows installer service.

The idea is to monitor the windows installer service to find out what applications/utilities are being installed, this includes the installation source and settings provided by the user. I would like to keep track of installations the user does so that it can be reproduced with a wizard type interface.

So I would like to be able to start a application and display a UI which ask certain questions when a installation is started, e.g. should the installation source be copied to another location (for future reference), should the installation commandline be copied, should the installation start in full log mode, etc.

I know it is possible to grab this information after the fact through WMI, maybe it is possible to monitor the windows installer service through WMI?

A: 

You can turn on Windows Installer Logging and have all installations logged to the %TEMP% folder. You can then analyze the log files, extract properties/settings/UI selections and write your own application to reproduce the installations.

Regarding automatically copying the installation source, that's a tricky one. You don't know at the time if the MSI includes embedded CAB files (i.e. one MSI contains everything) or if it's all uncompressed and referencing other files on a CDROM (e.g. Microsoft Office). Additionally the MSI may be able to run standalone, or it might be bundled with a bootstrapper EXE which is outside the scope of Windows Installer.

If you just want to simply monitor what applications/components are installed, then check the Event Log. Windows Installer logs information there automatically as products are installed/removed.

sascha
Good idea about the logs, but parsing them is a different story. Also good point regarding the source, I know I should be able to get the path at least, maybe display that to the user and let the user decide.
Schalk

related questions