• Welcome to Support Forum: Get Support for Patch My PC Products and Services.
 

PMPC bult-in variables

Started by sundi712, August 09, 2023, 09:51:38 AM

Previous topic - Next topic

sundi712

Is there any documentation for the variables used during PMPC processes? I am utilizing the Pre/Post script options and would like to write output directly to the PMPC logs. It would be great to use the built-in variables for this.
Thanks

Andrew Jimenez (Patch My PC)

Hello,

Have you seen the following article? https://patchmypc.com/pass-variables-into-pre-and-post-scripts

Let me know if you have further questions!

sundi712

Thanks- yes, I found that KB. The Product Name/Version parameters will be helpful but what about variables for things like the log path? (C:\Windows\CCM\Logs\PatchMyPCInstallLogs\PCname-App-AppVer.log).
I was able to write a script that determines the filename based on the package.xml contents but it would be great to use a built-in variable instead of having to add a pre-script for each app.

Andrew Jimenez (Patch My PC)

Hmm, I am unsure of any other variables provided in the scripts. I will reach out to the developers and let you know if you have access to those in the scripts.

Andrew Jimenez (Patch My PC)

Hello,

I heard back from the developers. No other variables than the documented ones are exposed to the scripts.

They also mentioned that you will want to ensure if you are writing to the scriptrunner log, you will want to conform to the formatting used by that log (CMTrace format)