OpenVPN Client on Windows 7 – Cannot Add Route from Config Script

openvpnroutewindows 7

I am connecting from my Windows 7 laptop to an openvpn server and I am unable to automatically add a route.
In my script I have the line:

route-up "route add 192.168.33.0 mask 255.255.255.0 10.0.33.1"

but after the connection is set-up there is an error message:

Sat Feb 06 20:30:07 2010 us=974000 openvpn_execve: CreateProcess route failed: Cannot find file specified.   (errno=2)
Sat Feb 06 20:30:07 2010 us=989000 Route script failed: external program did not execute -- returned error code -1

The openvpn.exe is run as administrator.
Any ideas?

Best Answer

better use:

route 192.168.33.0 255.255.255.0 10.0.33.1

this way route will be added and deleted when you connect and disconnect the vpn