Advanced Configurations Using Registry Values for Patch My PC’s Publisher
In this article, we will describe some advanced settings you can make using registry values for our Publisher.
There are some scenarios where we need to change a default behavior to address specific customer issues/needs.
These advanced settings are not available via the Publisher user-interface and can only be set via RegValues.
Topics covered in this article:
- Enable the Delete Update Button in the Modify Updates Wizard
- Save Detection Method PowerShell Scripts to Custom Folder
- Change SCCM Query to Use v_GS_INSTALLED_SOFTWARE SQL View
- Change the SQL Timeout Period
- Increase the HTTP Download Timeout
- Change Catalog XML Parsing to Use Sequential Method
- Force legacy method to sign PowerShell scripts
Enable the Delete Update Button in the Modify Updates Wizard
The delete update button is not enabled by default because it can cause hash issues if an update is deleted while that product is still enabled, causing the same UpdateID to be republished. If you have a scenario to delete updates, such as cleaning up vendors from WSUS you can enable the button using the value below.
- REG ADD “HKLM\SOFTWARE\Patch My PC Publishing Service” /v EnableDeleteUpdates /t REG_DWORD /d 1 /f
Save Detection Method PowerShell Scripts to Custom Folder
Based on UserVoice feedback, you can now save all PowerShell detection method scripts to a secondary folder location. By default, all detection method scripts are also saved to “<InstallDir>\Detection Method Scripts”
- REG ADD “HKLM\SOFTWARE\Patch My PC Publishing Service” /v DetectionMethodScriptsAddtionalSavePath /t REG_SZ /d “\\server\examplefolder” /f
Change SCCM Query to Use v_GS_INSTALLED_SOFTWARE SQL View
By default, we use the v_Add_Remove_Programs SQL view to query the supported products in our SCCM scan feature. For extremely large environments, SQL queries against this view can be slower since it’s not indexed.
You can change the view to use the v_GS_INSTALLED_SOFTWARE for better performance since it is indexed. Note: this view will contain slightly different results since it’s based on asset intelligence.
- REG ADD “HKLM\SOFTWARE\Patch My PC Publishing Service” /v UseGSINSTALLEDSOFTWARE /t REG_DWORD /d 1 /f
Change the SQL Timeout Period
By default, the SQL timeout period for each product query is 90 seconds. This can be changed using the REG ADD command below where 300 is the number of seconds for the timeout. Valid timeout ranges are from 1 – 600.
- REG ADD “HKLM\SOFTWARE\Patch My PC Publishing Service” /v SQLTimeoutinSeconds /t REG_DWORD /d “300” /f
Increase the HTTP Download Timeout
By default, the HTTP download timeout period is 15 minutes. This can be changed using the REG ADD command below where 1800 is the number of seconds for the timeout (30 minutes). Valid timeout ranges are from 10 – 3600 (10 seconds to 60 minutes).
- REG ADD “HKLM\SOFTWARE\Patch My PC Publishing Service” /v DownloadTimeout /t REG_DWORD /d “1800” /f
Change Catalog XML Parsing to Use Sequential Method
By default, we use a parallel method to parse our catalogs XML. In some rare cases, you may receive an error in the PatchMyPC.log saying:
Error while parsing XML node of the catalog: Index was outside the bounds of the array
If this occurs, add the registry value below to change it to use a sequential method, and restart the PatchMyPCService.
- REG ADD “HKLM\SOFTWARE\Patch My PC Publishing Service” /v UseSequentialMethod /t REG_SZ /d “1” /f
Force legacy method to sign PowerShell scripts
By default, we will attempt to use native .NET code in order to code sign PowerShell scripts that are generated by the Publisher. For example, detect scripts, requirement scripts, and recommended pre/post scripts. Additionally we fall back to using PowerShell to sign these scripts if the .NET signing fails. If .NET code signing is failing, or you do not wish to use it you can use the below REG ADD command and then restart the PatchMyPCService. The result is all code signing will be done using the Set-AuthenticodeSignature cmdlet.
- REG ADD “HKLM\SOFTWARE\Patch My PC Publishing Service” /v UseLegacyMethodToSignScript /t REG_DWORD /d “1” /f