Search code examples
c#.netwixwindows-installer

How to create installation logs at a particular location using Wix toolset?


I am using Wix bootstrapper to install my application, I want the log file at a particular location so that it would be easier to locate rather than look into %temp%, I am aware that we can give the location for logs through command line, but i want to keep things simpler for the client, so is there any way to give hard coded location through wix code? or I have to write CA for copying the logs from temp folder which i believe would not be the best approach?


Solution

  • A workaround which I did is to create a batch file and run the setup through that batch file and passing the log file location -

    start setup.exe /l "C:\setuplog\your.log"

    This will create installation log in setuplog folder in C drive.