As people know that after update openvpn to 2.5 and windows update to 21H1 everything just stop work . then this is a trick to make only windows can automatic map a network drive when you connect to openvpn server. Mapping a network drive over VPN is main use for VPN and there are a lot use that , but making it work requite some time and some know how to . if some one dont know how it work it is quite hard to do for them so this is all will be done .
going to config folder and create a bat file name as your connection file with _up as picture
Image may be NSFW.
Clik here to view.
open ddwrt_up.bat and add this line into it.
the main job this file do is start other script file to run . as openvpn 2.5 there is no data transfer between server and client so we need the first script finish then openvpn can get ip and transfer data over tunnel.
now open you drive.bat and edit as follow.
because windows update make thing more trouble so you need to add this line to make it work . click search and type cmd right click and choose open with administrator
after that you need restart computer to make it work for you.
going to config folder and create a bat file name as your connection file with _up as picture
Image may be NSFW.
Clik here to view.

open ddwrt_up.bat and add this line into it.
Code:
@echo offstart drive.batEXIT
now open you drive.bat and edit as follow.
Code:
timeout /t 3net use N: \\nha.thuctap1.com\nha /user:root raspberry /PERSISTENT:YEStimeout /t 5 /nobreak > nul
Code:
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLinkedConnections /t REG_DWORD /d 1 /f
after that you need restart computer to make it work for you.
Statistics: Posted by 300000 — Tue Jul 13, 2021 9:44 pm