There has been some other threads on this subject. What VPN client are you using? If you use Cisco's VPN client on the laptop, it can be configured to start the tunnel before the user logs on to the laptop.

Then when the user does log on, your script should execute.
_________________________
Home page: http://www.kixhelp.com/hb/