route -p add <destination> mask <subnet mask> <gateway> metric <cost metric> if <interface>

where:
metric: lower is higher priority
interface: the interface number is the one you see for the interface when
doing "route print", e.g. "0x1" is the loopback interface

the routes are stored in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\PersistentRoutes