cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JoderCoder
Level 8

Install logs for serviceability

Here is a scenario:

A non-technical user does the following

1. Install an app
2. Upgrade the app
3. Uninstall the app
4. Install the app
5. And so on

Would it be possible to keep the logs from step 1 to 5 automatically without making the user having to use msiexec from command line? If I use a setup exe, I can pass the log parameter to the msi, but it will overwirte the log each time.

So is this possible for msi and setup exe? This will be required for a good serviceability.

Not: The target machines are using msi 3.0 or greater, definitely not all 4.0.
Labels (1)
0 Kudos
(4) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

If you are installing on systems with Windows Installer 4.0 or later, the MsiLogging property will generate a new log for each execution. Unfortunately, this log will be in a temp folder with a randomly generated name. Outside of that or to control the location, you'd need to somehow specify the log file name, perhaps with a custom bootstrap, or it won't happen.

As an idea, perhaps you could try the environment variables %DATE% and/or %TIME% in your setup.exe command line to get changing names?
0 Kudos
JoderCoder
Level 8

Good idea, thanks Michael, I will try that
0 Kudos
JoderCoder
Level 8

Unfortunately, this didnt work Michael... it just names the file like Log%DATE%.txt. It doesnt resolve the actual date or time. Plus even it resolved, it could still be a problem since date has '/' in between and time has ':'. Those characters are not allowed in folder names.
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

Perhaps these variables are different from the usual ones as they don't show up if one runs set in the command prompt. But good point on the invalid characters. Ah well; it was worth a try.
0 Kudos