Installing the OpenVPN TAP Driver

I am trying to control multiple instances of the OpenVPN TAP driver in windows using tapinstall. It seems that all devices have the same HWID - "tap0901" - I can’t remove any of them using tapinstall - they all disappear on release

tapinstall.exe remove tap0901 

Also, when I install another instance with

 tapinstall.exe install OemWin2k.inf tap0901 

everyone else will get a reset (open connections using existing crane installations) because tapinstall tries to update drivers in all existing instances.

My solution was to rename all the hwid instances specified in the INF file to another, and also rename the .cat and .sys files to this new name; however, this violates the driver signing.

Does anyone know of any alternative ways to manage multiple instances of the OpenVPN TAP driver that let me:

  • Remove any driver instance without interfering with other instances.
  • Install new instances without interfering with other instances

Win32 API calls are also suitable; I am trying to write a program to automate this.

Thanks for the help!

+4
source share
1 answer

If someone is wondering, I found a way to do this, but it is pretty hacked. Inspired by the devcon source code.

  • SetupDiCreateDeviceInfoList
  • SetupDiCreateDeviceInfo
  • SetupDiSetDeviceRegistryProperty
  • SetupDiCallClassInstaller
  • UpdateDriverForPlugAndPlayDevices
  • SetupDiSetDeviceRegistryProperty - Rename the hardware identifier to something unique here.
+5
source

All Articles