0

I am using WIX 3.7, and I am wanting to have my MSI and BURN log files, be created at my desired location. I tried verbatim both the approaches, mentioned in How to set or get all logs in a custom bootstrapper application newsgroup post. However, Log File gets created in the default location. Since I had time on hand, I decided to explore WIX 3.7 through WIX 3.9 Source Code, attempting to find where BURN_PACKAGE-> sczLogPathVariable data member is used.

However I found just 5 references to BURN_PACKAGE-> sczLogPathVariable

\wix38-debug\src\burn\engine\logging.cpp(191):
if ((!fRollback && pPackage->sczLogPathVariable && *pPackage->sczLogPathVariable) ||

\wix38-debug\src\burn\engine\logging.cpp(197): hr = VariableSetString(pVariables, fRollback ? pPackage->sczRollbackLogPathVariable : pPackage->sczLogPathVariable, sczLogPath, FALSE);

\wix38-debug\src\burn\engine\package.cpp(152):
hr = XmlGetAttributeEx(pixnNode, L"LogPathVariable", &pPackage->sczLogPathVariable);

\wix38-debug\src\burn\engine\package.cpp(303):
ReleaseStr(pPackage->sczLogPathVariable);

\wix38-debug\src\burn\engine\package.h(165):

LPWSTR sczLogPathVariable; // name of the variable that will be set to the log path.

I was expecting some code that would actually retrieve the value of MY VARIABLE and then CONCATENATE that value with the Log File Name that was synthesized, to create the complete file path. Maybe I am missing something obvious ? Do you guys have any suggestions ?

Angel Angel
  • 19,670
  • 29
  • 79
  • 105
D Deshmane
  • 1,125
  • 4
  • 15
  • 27

1 Answers1

1

*Package/@LogPathVariable is used to specify a variable that gets the path to the log. To control the logging, use the Log element.

Bob Arnson
  • 21,377
  • 2
  • 40
  • 47
  • Hi Bob, I have posted http://stackoverflow.com/questions/23424363/wix-bootstrapper-msi-package-logging-how in my query but not sure how does that changed to something different. But, yes I have tried Log element approach mention in that post. But no success. Log file still got created at default location(i.e. %TEMP%) – D Deshmane Dec 23 '14 at 05:46
  • Plz ignore above comment,I hv posted http://stackoverflow.com/questions/23424363/wix-bootstrapper-msi-package-logging-how in my query but not sure how does that changed to something different.But, yes I hv tried Log ele approach.But no success.Log file still got created at default location(i.e. %TEMP%), and it just modifies the file name instead of it's default naming convention.My understanding around Log Element is that to overwrite BURN logging so that we can have Log file created at our given location, but it is not doing so.Can you please help me out, how I can customize Log file location – D Deshmane Dec 23 '14 at 05:58
  • I suggest opening a new question with details about what you tried with `Log` and what did and didn't work. It doesn't really fit into this question. – Bob Arnson Dec 23 '14 at 06:11
  • Ok, I ll do the same. Thanks ! – D Deshmane Dec 23 '14 at 06:16