I am trying to find a way to have windows 7 VPN clients connect to the VPN server automatically via Group Policy. I tried using a login script but it looks like the scripts are shared from sysvol and the client can't execute the script because VPN isn't connected.
At the moment the only thing i have that works is to put a batch file in each users startup folder that calls rasdial. But i would much rather have a solution that is manageable from the server itself.
You've got a chicken-and-egg problem, like @TheCleaner said in his comment.
The "always on VPN" solution that Microsoft would be recommending today would be DirectAccess. The functionality provided by DirectAccess causes PCs, effectively, to perform as though they are connected to the private enterprise LAN anywhere that they have Internet connectivity (intermediate firewalls willing).
Because Microsoft has another solution for this problem I think you're unlikely to find a "clean" solution involving the command-line
rasdial
. Certainly, there is no solution (using only Microsoft software) aside from DirectAccess that is going to get you VPN connectivity during boot to allow all of Group Policy processing to execute on remote machines.