$cs.Job_Start
Description
Section titled “Description”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.
Syntax
Section titled “Syntax”$cs.Job_Start(string jobtype, string packagename, string packageversion, string logpath, string action)
Parameters
Section titled “Parameters”jobtype (String)
Section titled “jobtype (String)”Job type, written to the log. The template passes WS (workstation). Keep this value.
packagename (String)
Section titled “packagename (String)”Name of the package being installed or uninstalled.
packageversion (String)
Section titled “packageversion (String)”Version of the package.
logpath (String)
Section titled “logpath (String)”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.
action (String)
Section titled “action (String)”The kind of action being performed, e.g. INSTALL or UNINSTALL.
Return value
Section titled “Return value”None
Example
Section titled “Example”This is what the MAIN section of the PowerPack template already does for you — you do not need to call it yourself:
#### MAIN ####
$cs.Job_Start('WS', $global:AppName, $global:AppRelease, $global:LogFile, 'INSTALL')