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]: VbsCaPropertyGet()[Next]: VbsCaRunSync()
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->VbsCaRaiseError()

VbsCaRaiseError()

This is the name of a VBSCRIPT function which can be used by any script defined using the "VbsCa" command.

This function can be used as an alternative to setting an entry point's return code with "VbsCaEntryName". In complex code this might be the easiest way of cleanly terminating the function.

This function will not be well handled if executed from the mainline rather than within one of the defined entry points. While it will log the details no message box will be displayed.

The function takes these parameters:

  1. The error source. What process was executing (and possibly why) at the time of failure?

  2. The error description. It is recommended that this text include any relevant return codes or similar information that may help guide a user to a resolution of this problem.

    I recommend that the exact same "text" not be used for similar problems in different areas to reduce the chance of misunderstandings.

Without looking at log files (which may not exist) the above parameters are all that provides the user with any idea of why the install failed so they should be be as detailed as possible while still being "user friendly". It is recommmended that the "source" be as detailed as possible.

EXAMPLE

<$VbsCaEntry "Install">
   VbsCaRaiseError "Install()", "Failed setting up registry key """ & Key & """" _
                              & vbCRLF & vbCRLF _
                              & "Reason for failure: " & err.description
<$/VbsCaEntry>


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: VbsCaPropertyGet()[Next]: VbsCaRunSync()


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Sunday February 28 2016 at 3:45pm
Visit MAKEMSI's Home Page
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.