This folder contains code, documents, and information that is licensed under the terms of the Zero G Software Developer Network (DevNet) license agreement. By downloading, viewing, or otherwise using this code, you agree to the terms of that license agreement. See http://www.ZeroG.com/devnet for more information.



Custom Code Action: EndProcess


Classname: com.zerog.ia.customcode.actions.ExpressionEvaluator

Description: This class evaluates mathematical expressions. It is helpful when you need to do a simple calculation, but don't want to write any extra custom code.

Input InstallAnywhere Variables:

$EP_EXECUTE_TIME$: This variable must be set to either "install" or "uninstall" (without quotes). This will determine when the action is executed. If you set this variable to "uninstall", please make sure that you add the action to the Install Task.

$EP_PROCESS$: This variable should contain the command you would like to execute.

    -fk    force kill PROCESS

    -c    close (send WM_CLOSE) to the PROCESS

    -p[nihr]    set priority to "Normal", "Idle", "High", "Real Time"

        [ba]    "Below Normal " and "Above Normal" only on W2K or higher

    Examples:

        -fk cmd.exe    execute a force kill on cmd.exe.

        -fk sleep*    force kill all processes starting with "sleep"

        -ph w*.exe    set priority to hight for all matching processes

        -c explorer.exe    close explorer process

$EP_DISPLAY_DIALOG$: If set to true a dialog will be displayed to the end-user.

$EP_DIALOG_TEXT$: This is the text that will be display in the dialog displayed if the specified process is running. By default this will text will be set to the following.

    "The following process is currently running. Select 'Next' to shutdown this process and continue or select 'Cancel' to exit the Uninstall."

Output InstallAnywhere Variables:

$EP_EXIT_CODE$: This variable will be set with an exit code. The error levels are as listed below.

0 - process found

1 - process not found

2 - program error

General Instructions:

Remember that for the action to work correctly make sure to set $EP_EXECUTE_TIME$ to either "install" or "uninstall", and $EP_COMMAND$ to the command you would like to perform (such as -fk cmd.exe).

Thank you,
Zero G Developer Solutions.

Additional Notes:

Special thanks to Igor Nys, the creator of the pv utility, which this custom code action is based around.


20 November 2003