开发者

OpenVPN TAP Driver Installation

I'm trying to control multiple instances of OpenVPN's TAP driver in windows via tapinstall. It seems that because all of the devices have the same HWID -- 'tap0901' -- I'm unable to remove any single one with tapinstall -- all of them disappear when i issue

tapinstall.exe remove tap0901

Furthermore, when I do install another instance with

tapinstall.exe install OemWin2k.inf tap0901

all the other ones get reset (open connections using those existing tap installations are broken) because tapinstall tries to update the drivers on all the existing instances.

My sol开发者_开发问答ution thus far was to rename all instances of the hwid specified in the INF file to something else and to also rename the .cat and .sys files to this new name as well; however, this breaks the driver signing.

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

  1. Remove any single instance of the driver without interfering with the operation of other instances
  2. Install new instances without interfering with the operation of the other instances

Win32 API calls are okay too; I'm trying to write a program to automate this.

Thanks for the help!


If anyone is wondering, I found a way to do this, but it's pretty hacky. Inspired by the devcon source code.

  1. SetupDiCreateDeviceInfoList
  2. SetupDiCreateDeviceInfo
  3. SetupDiSetDeviceRegistryProperty
  4. SetupDiCallClassInstaller
  5. UpdateDriverForPlugAndPlayDevices
  6. SetupDiSetDeviceRegistryProperty - Rename the Hardware ID to something unique here.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜