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]: /JsCaEntry[Next]: MacroCfg
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->Source Code->Commands->JsCaSetup

The "JsCaSetup" Command

This command is used to schedule a preexisting JSCRIPT custom action (its already in the "Binary" table). It also sets up the "Action Text" which gets displayed in the progress bar even if your script does not update the bar itself.

You would normally create the script with "JsCa" but this is not required.

If you have an existing Windows Scripting Host (WSH) script which you want to use, use the "ExeCa" command to invoke "WSCRIPT.EXE". All parameters will typically be passed on the command line and no logging will take, in my mind good reasons why this should be avoided at nearly all costs. I recommend rewriting to use the "JsCa" command instead.

This command takes these parameters:

EXAMPLE

;--- Create a JSCRIPT and add to the binary table ---------------------------
<$JsCa Binary="SimpleCa.js">
    var some = 1

    <$JsCaEntry "Install">
    {
        try
        {
            CaMsgBox("E", "test of the error box")
        }
        catch(e)
        {
            CaDebug(0, "Install_1 function: trapped")
        }
    }
    <$/JsCaEntry>

    <$JsCaEntry "UnInstall">
        UserFunction("Uninstalling...")
    <$/JsCaEntry>

   //==========================
   function UserFunction(Text)
   //==========================
   {
       CaDebug(0, "Doing something...")
       CaMsgBox("I", Text)
       CaDebug(0, "Finished doing something...")
   }
<$/JsCa>

;--- Call the above script during install and uninstall ---------------------
<$JsCaSetup Binary="SimpleCa.js" Entry="Install"    Deferred=Y Seq="InstallFiles-" CONDITION=^<$CONDITION_INSTALL_ONLY>^>
<$JsCaSetup Binary="SimpleCa.js" Entry="UnInstall"  Deferred=Y Seq="InstallFiles-" CONDITION=^<$CONDITION_UNINSTALL_ONLY>^>


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 23 Aug 2008Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: /JsCaEntry[Next]: MacroCfg


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Thursday August 28 2008 at 11:28am
Visit MAKEMSI's Home PageThis external link was OK when tested at 13 Aug 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 23 Aug 2008