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

OpenVPN - detection fails to find older version?

Started by Bjerring, April 10, 2024, 07:25:31 AM

Previous topic - Next topic

Bjerring

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?

Hugo Marinho (Patch My PC)

#1
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

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! :)

Bjerring

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'



Bjerring

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.