MAKEMSI quickly and reliably creates MSI files in a non-programmatic way
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
[Bottom][Contents][Prev]: CaCreateFolder()[Next]: CaDebugPause()
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->Source Code->VBSCRIPT->Custom Action Functions->CaDebug()

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:

  1. To Progess Bar?
    More details below but in summary:

  2. The text of the message.

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 MSI Platform SDK "UISample.MSI" 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:

EXAMPLE

<$VbsCaEntry "Install">
   CaDebug 1, "Installing """ & AppName & """"  ;;To progress dialog and logs
<$/VbsCaEntry>


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006 & 2007 for the Windows SDK (Windows Installer) area.This external link was OK when tested at 25 Jun 2008Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: CaCreateFolder()[Next]: CaDebugPause()


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Sunday July 06 2008 at 11:25am
Visit MAKEMSI's Home PageThis external link was OK when tested at 21 Jun 2008

HTML page dated Mon, 29 Jan 2007 00:11:11 GMT
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006 & 2007 for the Windows SDK (Windows Installer) area.This external link was OK when tested at 25 Jun 2008