Hi
Using intune, I'm trying to update an old version of OpenVPN 2.4.9.i601. Which was installed from a package created with PFsense firewall.
The PatchMyPC detection script says that OpenVPN was not detected. As far as I can tell, the script assumes the openVPN is found under the reg key ..\uninstall\{b0168d30-5fdb-49b3-bd29-8f6d87543786}. However the old version I have installed, did create a key named ..\uninstall\OpenVpn.
Is there anyway I can have a custom detection script or can the detection script be changed?
Hi there,
The default scripts, cannot be changed. If you want to change the script yourself, you can do so directly from the Intune Console on the package itself.
We would recommend you to add a community script we created, that ensures that it uninstall any previous versions of software's, as a custom pre-script to the OpenVPN package.
Link to script here - Github (https://github.com/PatchMyPCTeam/Community-Scripts/tree/main/Uninstall/Pre-Uninstall/Uninstall-Software)
For more info on how to add custom scripts to packages, see more details below:
https://patchmypc.com/custom-options-available-for-third-party-updates-and-applications#custom-scripts
Hope to have helped, have a great day! :)
Thanks, but I'm not sure I fully understand how this will help?
I can create my own detection rule that triggers the uninstall script. But as I want to update any existing installations, I would need some way of triggering the PatchMyPC update/install package after the uninstall.
If the user just install the PatchMyPC "OpenVPN" package from intune the existing version is replaced as expected. So I don't think it's an "uninstall" problem. It's a problem with the detection script.
If I change the line below, then the old version of OpenVPN gets detected.
FROM:
if($_.pschildname-eq($m='{b0168d30-5fdb-49b3-bd29-8f6d87543786}'
TO:
if($_.pschildname-eq($m='OpenVPN'
I'm going to change the detection script i Intune for now. That will get all old version updated.
Then going forward the default detection script will work again for next updates.