How to configure HREFRESH.CFG pre (PreCmd) and post (PostCmd) commands with multiple parameters

Document ID : KB000055472
Last Modified Date : 14/02/2018
Show Technical Document Details

Hrefresh uses Hsync to synchronize reference directories and uses Hexecp to execute any programs on the reference machines; using Pre and Post commands as appropriate, as part of the refresh.

The following gives example HRefresh.cfg entries for Pre and Post commands that can be used. HRefresh passes the commands to Hexecp which in turn handles the remote program execution via the Harvest Remote Agent technology.

Harvest 7.1 GA or P1

PreCmd:{h:\context.bat [project][state]}

PostCmd:{h:\user_pkg.bat [user] ["package"]}

Harvest 7.1 P2

Harvest 7.1 P2 introduced the '-ma' flag to Hexecp. This option is used to better evaluate and handle multiple arguments that are being passed to the Hexecp program. To satisfy this new requirement, '-ma' can be added as an additional argument in the Pre and Post command syntax, e.g.:

PreCmd:{h:\context.bat [project][state] -ma}

PostCmd:{h:\user_pkg.bat [user] ["package"] -ma}

Note: The '-ma' flag is not required if there is only a single argument being passed.