I want to add some print.out (or ECHO) statements to WXS. How could I do this?
When compiling a .wxs file, you can use preprocessor directives:
<?error This is an error message ?> 
<?warning This is a warning message ?>
WiX builds Windows Installer packages, which are databases. Windows Installer processes the database via a sequence of actions. There is no facility to expand on Windows Installer's logging.
When installing an MSI file you can create a log msiexec /?:
Logging Options
/l[i|w|e|a|r|u|c|m|o|p|v|x|+|!|*] <LogFile>
    i - Status messages
    w - Nonfatal warnings
    e - All error messages
    a - Start up of actions
    r - Action-specific records
    u - User requests
    c - Initial UI parameters
    m - Out-of-memory or fatal exit information
    o - Out-of-disk-space messages
    p - Terminal properties
    v - Verbose output
    x - Extra debugging information
    + - Append to existing log file
    ! - Flush each line to the log
    * - Log all information, except for v and x options
/log <LogFile>
    Equivalent of /l* <LogFile>
Custom actions can write into the log. But custom actions are not written in a .wxs file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With