![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Creating scheduler rules to connect to the internet on boot /disconnect on reboot I tried to create a service to connect to the internet automatically on vista launch and disconnect on vista reboot, but all those srvany.exe and sc.exe tools don't work properly any longer in Vista, or rather they don't work properly with rasphone.exe, because MS hasn't updated that utility since 1995, just recompiled it to x64 bit. But this Task Scheduler 2.0 integrated in Vista is a great thing, you can just define any rule and then define some task that will be executed if the defined event occurs. So I defined that rasphone.exe -d ProviderName is started when the Lan-Connection is established and rasphone.exe -h (disconnect) is started when a reboot occurs (I am using shutdown.exe to reboot). I created two rules and exported them, you can download them here: To connect: http://home.arcor.de/wrfan/files/vis...%20starten.xml To disconnect: http://home.arcor.de/wrfan/files/vis...%20beenden.xml Don't just import the rules into scheduler, you have to adjust them to your configuration, these ones were created for the German version of Vista and for a German ISP. Open the event log in XML format ("System" hive) and copy the events in question into the trigger rules sections (beware the XML syntax). The rules go like this: <QueryList> <Query Id="0" Path="System"> <Select Path="System">*[System[Provider[@Name='Tcpip'] and (EventID=4201)]] and *[EventData[(Data='LAN-Verbindung')]]</Select> </Query> </QueryList> and: <QueryList> <Query Id="0" Path="System"> <Select Path="System">*[System[Provider[@Name='USER32'] and (EventID=1074)]] and *[EventData[(Data='C:\Windows\System32\shutdown.exe (PHP)')]]</Select> </Query> </QueryList> This is obviously just for cable modems, I am using a DSL connection Don't define the start of RASMAN service as the trigger, it's not always detected on Vista startup, so the scheduler won't react. Define the lan connection as the trigger, it's always in the event log |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| WMPlayer connect/disconnect | Vista General | |||
| device connect/disconnect | Vista General | |||
| Dual boot/internet won't connect | Network & Sharing | |||
| Reboot to Connect to the Internet | Vista networking & sharing | |||
| Vista Laptop reboot will not connect to internet | Vista networking & sharing | |||