CaDebug() |
This function can be used in any generated jscript or vbscript custom actions.
This function can update line 1 and 2 of the progress bar. It always updates any verbose log you may have set up and optionally creates/updates a separate text log file. It also echos the message to the console if being tested via cscript.
The function takes these parameters:
The subroutine "VbsCaLogInc" can be used to incement and decrement the indenting level in the log making the generated logfile much easier to read and understand, for example:
<$VbsCaEntry "Install"> CaDebug 1, "Installing """ & AppName & """" ;;To progress dialog and logs VbsCaLogInc 1 CaDebug 1, "Installing the first bit" VbsCaLogInc 1 CaDebug 1, "First part of the the first bit" ... VbsCaLogInc -1 CaDebug 1, "Installing the second bit" ... VbsCaLogInc -1 <$/VbsCaEntry>
On entry if "err.number" is not 0 then the "err" details are dumped as its quite possible an error has occurred. Scripts are hard to debug so this hopefully makes it easier. Any "err" state is preserved by this routine.
Log File [PARM1 = 0] |
The line is written to the verbose log, it has these attributes:
Status Line 1 [PARM1 = 1] |
The line is written to the verbose log, it has these attributes:
All MSI progress bars will have the capability of displaying some progress text as well as moving the "bar" (this control is called "status" in the Microsoft's "uisample.msi").
Assuming that you have the capability of displaying 2 text fields then I suggest that line 1 be used to indicate a major step is beginning and normal messages being generated to line 2 (this is also how Windows Installer does it).
This text should not be too long as the field is probably restricted in length and is the main thing the user sees. It would make sence to place a summary in "line 1" and a detailed equivalent in "line 2".
Status Line 2 [PARM1 = 2] |
The line is written to the verbose log, it has these attributes:
If these messages are not "consumed" by a dialog (see the "Progress Bar - More Detail" section) for information on how to make this happen) then the messages will not appear in a verbose log and this looks to be the case even when the dialog is not displayed (for example in a silent install).
EXAMPLE |
<$VbsCaEntry "Install"> CaDebug 1, "Installing """ & AppName & """" ;;To progress dialog and logs <$/VbsCaEntry>