Can't install tap driver using tapinstall.exe for OpenVPN when run from a .bat file, but it works when running OpenVPN installer

4

1

When I run

"..\bin\tapinstall.exe" install "..\driver\OemWin2k.inf" tap0901       

To add the tap driver, all I get back is a "failed" message with no details and the tap driver is not installed in Windows 7. The paths are correct and I tried specifying the absolute paths and it still didn't work. Running as an administrator also didn't fix the issue, however if I run the OpenVPN installer (latest version) and only select the tap driver, it is installed correctly.

I'm trying to make OpenVPN portable and the only thing standing in my way is installing the tap driver from a .bat file such as addtap.bat which comes from OpenVPN.

Coder

Posted 2011-08-28T13:35:32.980

Reputation: 445

3Portable OpenVPN? Good luck with that... most places where portable apps are useful, don't give users admin privileges. (If all you need is a secure tunnel, SSH can give that.) – user1686 – 2011-08-28T13:47:05.433

like i said i have it to the level i need except for the tap driver. can you help me get addtap to work? – Coder – 2011-08-28T13:58:06.860

Answers

0

I had a similar problem, and googling around found some potential solutions.

The simplest is to check whether the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce (HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\RunOnce for Win 7 64 bit) registry key exists, and add it if it does not.

There is a registry problem which is related to using ESET Smart Security; you can find the description here.

The one that worked for me was dropping the OpenVPN-provided TAP driver altogether, and using http://openvpn.se/files/xp64/tap-win64.zip (Which is unsigned, so if you want it to work on Win7, you will need to sign it - here is a tutorial on how to self-sign it. I only needed it to work on my own machine so I just set tapistall.exe into Vista compatibility mode.)

Tgr

Posted 2011-08-28T13:35:32.980

Reputation: 2 363