- Run OpenVPN installer and complete the installation process, selecting the desired options
- Save the package
- Edit the package and remove the registry keys listed below:
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\ROOT\NET
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\tap0901
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\wintun
- Save the package
- Add the following commands to a bat/cmd file to use as a post-activation script to create two adapters after playback:
"C:\Program Files\OpenVPN\bin\tapctl.exe" create --hwid ROOT\tap0901
netsh interface set interface name="Local Area Connection" newname="OpenVPN TAP-Windows6"
"C:\Program FIles\OpenVPN\bin\tapctl.exe" create --hwid wintun
netsh interface set interface name="Local Area Connection" newname="OpenVPN Wintun"
- Add the following commands to a bat/cmd file to use as a pre-deactivation script to cleanup the adapters created after playback:
"C:\Program FIles\OpenVPN\bin\tapctl.exe" delete "OpenVPN TAP-Windows6"
"C:\Program FIles\OpenVPN\bin\tapctl.exe" delete "OpenVPN Wintun"