Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WiX MSI: How to put print.out or echo statements in wxs file?

I want to add some print.out (or ECHO) statements to WXS. How could I do this?

like image 742
mgr Avatar asked Oct 28 '25 04:10

mgr


1 Answers

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.

like image 153
Tom Blodget Avatar answered Oct 30 '25 17:10

Tom Blodget



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!