Yeeha, my first WMI script \:o
It is not bullet proof because it relies on the name of the network connection having wireless in it.

 Code:
Break on

$wmiColl = GetObject("WinMgmts:root/cimv2").ExecQuery("Select * FROM Win32_NetworkAdapter")

For Each $wmiObj in $wmiColl
	If InStr($wmiObj.name, "Wireless")
		;NetConnectionStatus returns 0 for not connected and 2 for connected.
		If $wmiObj.NetConnectionStatus = "2"
			;do all kinds of stuff.
			;maybe ping a server in the on the network you want it to connect to
			;and if ping is successful run the login script
			;because users might connect to a wifi network at home.
		Else
			;wifi is not connected.
		EndIf
	Else
		;not a wifi connection.
	EndIf
Next
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.