Currently, under "Manage installation logging", it is possible to select the folder where logs will be generated when the installation/update of a software occurs. The logname is based on the installer's filename (i.e. for Github CLI 2.32.0 --> gh_2.32.0_windows_amd64.msi.log). It is not possible, though, to customize the log's filename (i.e. name if "Github CLI Install.log").
To circumvent this limitation, one could choose to rely on the "Modify command line" feature instead. But -- especially for msiexec-based installer -- the installation could fail if the destination folder does not exist. For example:
msiexec.exe /i gh_2.32.0_windows_amd64.msi /qn /l*v "C:\MyLogs\Github CLI Install.log"
would fail with an exit code 1622 if C:\MyLogs does not exist beforehand. Probably other installers are not resilient, and would fail too.
It appears that, when relying on the "Manage installation logging" feature, ScriptRunner would ensure the destination folder exists before launching the installation command.
My suggestion would be to extend the capacities of the ScriptRunner to:
detect the use of the logging switch on the command line modifier -- that switch is generally known to Patch My PC, as can be observed in the catalog XML file;
if a logging switch is detected, ensure the destination folder for the log file is created before launching the installation.
Caveat: would not work for (1) apps whose Patch My PC doesn't know the logging switch [in that case, please submit an issue so PmP could enhance its catalog] and (2) for logging option set in MST.
+1
Idea expanded from https://ideas.patchmypc.com/ideas/PATCHMYPC-I-3175 so it could be evaluated on its own.