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?
Asked
Active
Viewed 253 times
1
-
[Some logging details here](https://stackoverflow.com/questions/54453922/enable-installation-logs-for-msi-installer-without-any-command-line-arguments/54458890#54458890). Maybe an adaptation of [the VBScript here](https://learn.microsoft.com/en-us/windows/win32/msi/installer-enablelog) could help you (a bit down the page). There are several ways. Note that WiX Burn bundles (setup.exe launchers) have their own logging mechanism. The above is for MSI files themselves. – Stein Åsmul Jun 26 '20 at 12:00
-
I have updated the above link with more on Burn setup.exe logging. Have a look - see section *"Burn"*. Also: for the MSI you could conceivably just shell-open the log file from the temp folder from the setup-complete dialog? – Stein Åsmul Jun 26 '20 at 12:38
-
@SteinÅsmul Thanks a lot for sharing. – rishabh singh Jun 29 '20 at 11:42
2 Answers
0
You can set the MsiLogFileLocation and the MsiLogging MSI properties for your package.

Dan
- 1,927
- 2
- 24
- 35
-
Thanks Dan, but the issue is can we set the value of MsiLogFileLocation property through code? or we can only provide it via command line arguments? – rishabh singh Jun 26 '20 at 12:11
-
-
It is not working for me. please check this [wix mail list](http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Setting-MsiLogFileLocation-property-td7374335.html) – rishabh singh Jun 29 '20 at 11:34
0
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.

rishabh singh
- 23
- 5