Skip to content

$cs.Job_Start

Initializes the job/log context for the running script — sets up logging and related state for the package/version/action being processed. This is already wired up as fixed scaffolding inside the #### MAIN #### section of the PowerPack script template. PowerPack authors do not call this themselves inside PreInstall, Install, PostInstall, or the corresponding uninstall functions; it is documented here purely for reference/completeness since it is technically part of the public $cs.* API.

$cs.Job_Start(string jobtype, string packagename, string packageversion, string logpath, string action)

Job type, written to the log. The template passes WS (workstation). Keep this value.

Name of the package being installed or uninstalled.

Version of the package.

Path to the log file. An existing log file at this path is replaced, so the log only covers the current run. A timestamped copy of the log is also kept in a History subfolder next to it, which holds the 10 most recent runs. If the value contains no \, the log is written to <CapaInstaller log directory>\<packagename>\<packageversion>\<Action>.log instead.

The kind of action being performed, e.g. INSTALL or UNINSTALL.

None

This is what the MAIN section of the PowerPack template already does for you — you do not need to call it yourself:

Terminal window
#### MAIN ####
$cs.Job_Start('WS', $global:AppName, $global:AppRelease, $global:LogFile, 'INSTALL')