Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Enabling logging for Add/Remove Programs-initiated actions

44 views
Skip to first unread message

Lon Wergin

unread,
Aug 16, 2005, 12:23:01 PM8/16/05
to
How could I design an install such that it creates a log file when the user
presses the "Change" or "Remove" buttons for my installed product from the
'Add or Remove Programs' Control Panel applet?

On first glance, it would appear that I could create a CustomAction which
modifies the "UninstallString" and/or "ModifyPath" values under my product's
"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\[ProductCode]" key.
However, testing proves that those registry values are apparently not being
referenced by the 'Add or Remove Programs' applet.

Rage

unread,
Aug 19, 2005, 11:52:24 AM8/19/05
to
You need to set the group policy that enables logging for all installations.
(I assume you need this for your own debugging purposes).

You can do this by running gpedit.msc, and then under Computer
Configuration\Administrative Templates\Windows Components\Windows Installer\
you set the Logging policy to enabled. Enter "iwearucmpvo" without quotes to
log everything.

This creates a log file under Documents And Settings\<user>\Local
Settings\Temp\ with a cryptic name like "msie0ea.log" or similar.

Hope this helps and that I didn't misunderstand your requirements.

/ Rage

Lon Wergin

unread,
Aug 19, 2005, 12:17:02 PM8/19/05
to
Thanks for the reply Rage.

Actually, I was referring to products that we create for our customers (so
setting their machine policies isn't viable or desirable.) We'd like to
capture not only a log of the install (easy to do as our bootstrap loader is
the parent process), but also of the uninstall and possibly any maintenance
operations the user performs. That way, if something unexpected happens and
the customer ends up contacting our support, the log file would already be
available for the support person. Plus, if the problem is not reproducible
after having occurred once, the events of the original problem are not
forever lost.

Lon

Luke Surace

unread,
Aug 21, 2005, 6:23:07 PM8/21/05
to
The only way i can think of to do this is to create your own entry for
add/remove programs (hide the one created by windows installer). You entry
will run either setup.exe or your own executable that sets of the log when
its started, and then just kicks of the msi installer (MsiInstallProduct).

cheers,

Luke


"Lon Wergin" <qwe...@spammenot.com> wrote in message
news:A3DD42C6-5E72-40AF...@microsoft.com...

doc

unread,
Aug 22, 2005, 10:14:03 AM8/22/05
to
Not that I would suggest setting this on install/uninstall, but FYI you
can also set the reg key
HKLM\Software\Policies\Microsoft\Windows\Installer\Logging to
'voicewarmup'. This will create a log any time an install interfaces
with Windows installer install/repair/uninstall/admin etc.

Rage

unread,
Aug 22, 2005, 11:52:01 AM8/22/05
to
I don't know if you've tried this, but maybe you can call MsiEnableLog from a
custom action? The docs say: "The MsiEnableLog function sets the log mode for
all subsequent installations that are initiated in the calling process."

I do not know if this will create logs for the current installation though,
but it could be worth a try.

/ Rage

Adrian Accinelli

unread,
Aug 22, 2005, 7:02:01 PM8/22/05
to

The MsiEnableLog won't work from a custom action. It is intended to be
called by a bootstrapper program or from an application that makes use of
the MSI api for self-repair/etc.

As for changing the group policy via registry change -- if an installation
is taking place the log will not be created. Also if the key is being
written into the local machine policies (HKLM) you'd have to rely on a
deferred action to guarantee permission to create such a key and then you
are out of luck for the first installation.

What most people do is set a default logging level via a bootstrapper
application (not verbose since it slows down the install quite a bit and
makes for massive log files). Those launching msiexec use /L parameter and
those loading msi.dll use MsiEnableLog.

Sincerely,
Adrian Accinelli


"Rage" <Ra...@discussions.microsoft.com> wrote in message
news:C17C4828-8EDA-48B5...@microsoft.com...

0 new messages