You can easily use powershell:
PS C:\Users\mmoor> $RouteTable = Get-WmiObject Win32_IP4RouteTable
PS C:\Users\mmoor> $RouteTable.Mask
PS C:\Users\mmoor> $RouteTable.Destination
PS C:\Users\mmoor> $RouteTable.NextHop
Compare this w/ running ROUTE PRINT from a windows command line. Powershell is a verbose scripting language, so you can easily update the openvpn client config script, I'm assuming this is what you're trying to do. It's also object oriented based as well.
I would do something as follows:
1)Grab the routing table from wmi (shown above)
2)Each Routing table entry is one entry in an array (hence the  after the variable above)
3)Do a foreach on the array until you find the IP Address you're looking for
4)Get the NextHop member from the RouteTable entry and store it
5)Read in the OpenVPN client config file (using get-content in powershell will create a string array of the file)
6)Iterate through the string array until you find the string you are supposed to replace, then replace the string and save the file.
Hope this points you in the right direction.