Question

am using basic MSI project to prepare setup.exe. Which is running very well on many of my client machines and creating serious issues on few PC's. now i would like to add a logging as part of setup.exe.

Requirement is on either success or failure installation i want to generate a log file to know what happened exactly behind the scenes. here am having few VBScripting also included.

i had a command line parameter.

setup.exe /v"/l*v C:\LogFile31122012.log"

but i would like to generate it on clicking setup.exe file itself. and also the filename shouldn't be harcoded.

Any clues might help a lot. i tried with installshield project --> build --> setting menu. but couldn't get any breakthrough.

thanks in advance.

Regards, Pavan

Was it helpful?

Solution

As long as your target machines are running Windows Installer 4.0 or later, you can set the MsiLogging property (via the setting in the General Information view), and a log file will be created in %TEMP%.

If your target machines are running an earlier version of Windows Installer, or if you need to control the directory or filename, you can store some command-line parameters into setup.exe. However I don't know of a good way to tweak the filename here to ensure the file doesn't already exist (both %DATE% and %TIME% may contain characters that cannot be used in a filename, and %RANDOM% doesn't provide much meaning).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top