Support Forum: Get Support for Patch My PC Products and Services

Microsoft Configuration Manager and Intune (Enterprises/Paid) => Support and General Questions (Enterprises Using ConfigMgr and Intune) => Topic started by: sundi712 on August 09, 2023, 09:51:38 AM

Title: PMPC bult-in variables
Post by: sundi712 on August 09, 2023, 09:51:38 AM
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
Title: Re: PMPC bult-in variables
Post by: Andrew Jimenez (Patch My PC) on August 09, 2023, 11:18:38 AM
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!
Title: Re: PMPC bult-in variables
Post by: sundi712 on August 09, 2023, 12:42:58 PM
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.
Title: Re: PMPC bult-in variables
Post by: Andrew Jimenez (Patch My PC) on August 11, 2023, 02:25:34 PM
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.
Title: Re: PMPC bult-in variables
Post by: Andrew Jimenez (Patch My PC) on August 14, 2023, 11:15:30 AM
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)