0

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

Pavan N
  • 255
  • 2
  • 6
  • 21

1 Answers1

1

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).

Michael Urman
  • 15,737
  • 2
  • 28
  • 44
  • 1
    If you choose to use MsiLogging, be aware of this nasty Windows 7 bug: http://support.microsoft.com/kb/2564571 It's a problem in Windows but *You* will get the help desk call. :) Personally I don't enable logging by default. My installers fail so rarely that it's a waste of resources to enable it. – Christopher Painter Dec 31 '12 at 14:11