(Windows) How can I prevent the OpenVPN client uninstaller from removing my TAP interface?

Instructions and tips on how to roll your own client installer.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
stenya
OpenVpn Newbie
Posts: 1
Joined: Thu May 11, 2023 2:16 pm

(Windows) How can I prevent the OpenVPN client uninstaller from removing my TAP interface?

Post by stenya » Thu May 11, 2023 2:35 pm

Hi,

I am attempting to integrate the OpenVPN client into the installer for my Windows application. As a result, my app uses a unique instance of the OpenVPN client and a separate TAP interface, using the `--dev-node "my-tap-interface"` parameter.

However, when the original OpenVPN client is uninstalled using its native uninstaller, it removes all the TAP interfaces in the system. I would like to prevent this, ideally ensuring that the TAP network interface `my-tap-interface` remains unaffected by the OpenVPN installer/uninstaller.

Currently, I am using a somewhat labor-intensive workaround: I have recompiled the OpenVPN and TAP drivers with a modified hardware ID option for the TAP driver, changing `tap0901` to `mytap`. While this approach works well, it requires me to recompile OpenVPN each time I wish to update it to a newer version.

I would greatly appreciate any advice on this matter.

Post Reply