Files
windows-scripts/StartOpenVPN.bat
2023-12-05 19:39:38 -06:00

17 lines
468 B
Batchfile
Executable File

start /wait cmd /c "D:\Scripts\StopDownloaders.bat"
cd \
openvpn-gui.exe --command disconnect_all
taskkill /f /im "openvpn-gui.exe"
taskkill /f /im "openvpn.exe"
taskkill /f /im "openvpnserv.exe"
net stop "OpenVPNServiceInteractive"
net stop "OpenVPNServiceLegacy"
net stop "OpenVPNService"
timeout 10 >nul
ipconfig /flushdns
start openvpn-gui.exe --connect "USMidwest.ovpn"
timeout 30 >nul
ipconfig /flushdns
start /wait cmd /c "D:\Scripts\StartDownloaders.bat"
exit