you are here: Skip Navigation Linkshome > blog

HostingAbc Logo

Show all posts.
These days I've bought a software, AllwaySync (http://allwaysync.com/) to easily synchronize my laptop's data to my central NAS device at home. It is a really handy piece of software but it is a big pain in the ass to allways manually start the synchronization - so I've figured out how to schedule a task in Windows Vista on the event of connection my laptop to a specific WiFi network.

So here are the rough steps you need to do. Start event viewer and go to the Microsoft-Windows-WLAN-AutoConfig/Operational log and check for the events with the ID 8001. These events are logged when the WiFi connection is up & running - and it contains all the information on the WiFi network. Here is how it looks like:
WLAN AutoConfig service has successfully connected to a wireless network.

Network Adapter: Intel(R) Wireless WiFi Link 4965AGN
Interface GUID: {40a3c36f-e20e-4875-b4be-db61787a5fe3}
Connection Mode: Connection to a secure network without a profile
Profile Name: ExternalDevices
SSID: ExternalDevices
BSS Type: Infrastructure
BSSID: 00:1C:57:43:14:11
PHY Type: 802.11g
Authentication: WPA-Personal
Encryption: TKIP
802.1x Enabled: No
Now the nice thing about the new event viewer is that it can give you an XML representation as well of this event:
XML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
  <Provider Name="Microsoft-Windows-WLAN-AutoConfig"
 Guid="{9580d7dd-0379-4658-9870-d5be7d52d6de}" /> 
  <EventID>8001</EventID> 
  <Version>0</Version> 
  <Level>4</Level> 
  <Task>0</Task> 
  <Opcode>0</Opcode> 
  <Keywords>0x8000000000000000</Keywords> 
  <TimeCreated SystemTime="2008-09-03T08:13:56.216Z" /> 
  <EventRecordID>6497</EventRecordID> 
  <Correlation /> 
  <Execution ProcessID="12" ThreadID="14812" /> 
  <Channel>Microsoft-Windows-WLAN-AutoConfig/Operational</Channel> 
  <Computer>sparky</Computer> 
  <Security UserID="S-1-5-18" /> 
  </System>
- <EventData>
  <Data Name="InterfaceGuid">{40A3C36F-E20E-4875-B4BE-DB61787A5FE3}</Data> 
  <Data Name="InterfaceDescription">Intel(R) Wireless WiFi Link 4965AGN</Data> 
  <Data Name="ConnectionMode">Connection to a secure network without a profile</Data> 
  <Data Name="ProfileName">ExternalDevices</Data> 
  <Data Name="SSID">ExternalDevices</Data> 
  <Data Name="BSSType">Infrastructure</Data> 
  <Data Name="BSSID">00:1C:57:43:14:11</Data> 
  <Data Name="PHYType">802.11g</Data> 
  <Data Name="AuthenticationAlgorithm">WPA-Personal</Data> 
  <Data Name="CipherAlgorithm">TKIP</Data> 
  <Data Name="OnexEnabled">0</Data> 
  <Data Name="ConnectionId">0xe</Data> 
  </EventData>
  </Event>


So you need to fire up Task Scheduler, create a new task, and in the triggers you should choose to run this task on a new event and use an XPath that matches the event that is logged. Here it is my version of the XPath that matches the event with ID 8001 and the Wifi network with the name: 'hostingabc.hu':
XML
1
2
3
4
5
6
7
8
9
<QueryList>
  <Query Id="0" 
Path="Microsoft-Windows-WLAN-AutoConfig/Operational">
    <Select Path="Microsoft-Windows-WLAN-AutoConfig/Operational">
		*{System\{(EventID=8001)}} and
 *{EventData{Data{@Name="SSID"}='hostingabc.hu'}}</Select>
  </Query>
</QueryList>

Note: I have a bug in my colorer and it does not handle the square bracket characters so I've replaced them with curly braces :) - just be sure you replace them to the proper square brackets.
Enjoy :).
add linkThe last comments:moszinet says:amugy: bluetooth, wifi van, irda nincs. 13.3 inches trubright kepernyo, 1 SD kartyaolvaso, taska nincs, eger normalis usb (ize .. csunya fekete ...), dvd iro van, floppy nincs. 150e ft -ot kerek erte. toshiba U30011V - novemberben vettem, nemzetkX says:mi van még rajta? bluetooth, irda, wifi? milyen a képernyő? kártyaolvasók; hány darab mit lehet beledugni? táska; egér; milyen színű? ugye van rajta dvd író? floppy? mennyit kérsz értgaba says:tök jó tipp, köszi, ez még jól jöehet! meken annyival egyszerűbb, hogy az address bookban eleve vannak csoportok, és azzal szinkronizálmoszinet says:eaposztrof: szerintem nem érdemes flash-re alapozni - sem java-ra. Ha megnézed a mobil alkalmazások zöme native. Standard UI, megszokott kezelhetőség. Nekem legalábbis ezek számítanak.Sanyi.NET says:You are now being upgraded from TRAITOR to ARCHITRAITOR. Congratulations! +10 skill points to SNOBBERY and +5 skill point to MAC_ADDICT. :))eaposztrof says:nem kell.. ime egy post ahonnan tovabb informalodhatsz a temaban: http://blog.meetup.hu/2008/10/23/novemberi-videok/ minden iphone kepes flasht futtatni, erre erdemes alapozni..Sanyi.NET says:nem csak áruló, hanem bűnöző is! telefonokat feltörtni - bűncselekmény!!! amugy tök jó teló :)))))))))
Copyright (C) 2003, Molnar Szilveszter m@il me
Sofisto, egypt, egipt, egyiptom, moszi, Molnar Szilveszter, Moszi, pagina personala, weboldal, aswan, cairo, piramide, pyramid, piramis, piramisok, auto, masina, opel corsa, sfantu gheorghe, sepsiszentgyorgy, st george, saint george, timisoara, romania, ungaria, Kefren, temesvar, magyarorszag, hungary, Chefren, Cheops, Keops, SMS, HURGHADA, Kartago Tours, photo, digital,