How to Enable GPUPDATE When Connected via OpenVPN Client

// Explanation: to prevent locking of processes, we set a proxy batch file (on_connect.bat) to call gpupdate (gpupdate.bat)
// add this line to the ovpn-File:
up 'C:\\Users\\%USERNAME%\\OpenVPN\\config\\on_connect.bat'

// on_connect.bat:
start .\gpupdate.bat

// gpupdate.bat:
echo trigger gpupdate ...
c:\windows\system32\gpupdate.exe /force
if errorlevel 0 goto exit
goto gpupdate

Leave a Reply

Your email address will not be published. Required fields are marked *