View Full Version : How to AUTOMATE VPN reconnection during PC wake-up from sleep mode

Little Charlie
03-18-10, 08:14 AM
This works for me on Windows 7 64 bit YMMV!!!

"Windows 7 Wake-Up VPN reconnect.txt"
Download link http://www.mediafire.com/?j5h2gndmtmw

Windows 7 instructions to automate VPN connection when PC wakes up.

NOTES: I have only tested this on Windows 7 64bit
Assumes a modest degree of user technical savvy.

OVERVIEW :- A 2 Step Process

STEP #1.
Create, test, and save to disk a batch file that calls rasdial.exe
(rasdial.exe has been part of Windows since Windows98)
--Here is my batch file script--
rasdial.exe yourvpnconnectioname username password

Create a basic task in Windows Task Scheduler to automatically run the
batch file when Windows wakes up. Here is how we do that....

1. Open Windows Task Scheduler
2. Select from right hand pane - "Create Basic Task"
3. Add your Task name. Optionally add a Task description -click next-
4. Select the Trigger - "When a specific event is logged" -click next-
5. Select Log = System
6. Select Source = Power-Troubleshooter
7. Enter Event ID = 1 -click next-
8. Select "Start a Program" (default selection) -click next-
9. Use Browse to locate your VPN batch file -click next-
10. Select "Open the properties dialog for this task when I click
finish" -click Finish-
11. Several customization choices here on 6 tabs. Select what you need.

For my needs I selected on General Tab -
"Run task whether user is logged on or not"
"Run with highest privileges"
"Config for" I left it at the default - "Windows Vista,Windows Server

All other Tabs I left to default settings/selections. But take a look at
them. When finished setting your choice of task properties -click OK-
Your done. Test it.

Little Charlie's Blues Pages

07-17-12, 12:48 AM
EDIT: Thanks for this!! You are the best.