ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA: Wireless sensor

<< < (11/11)

4wd:
OK, I'm going to have to call 'uncle' on this.

I still cannot get the damn tooltip to reappear on the Windows logon screen after someone has logged off without the computer having to be restarted.

So despite all the help from SJ, (thanks again), the best I can still come up with is a tooltip on the initial Windows logon screen and a SysTray icon that'll appear whenever anyone logs in, (at least that part worked).

Here's my code so far, there's no need for a service since I can't get anything to work after a log off anyway.


--- Code: AutoIt ---#NoTrayIcon#Region ;**** Directives created by AutoIt3Wrapper_GUI ****#AutoIt3Wrapper_UseUpx=n#AutoIt3Wrapper_UseX64=n#AutoIt3Wrapper_Res_Icon_Add=On.ico#AutoIt3Wrapper_Res_Icon_Add=Off.ico#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** Opt("TrayMenuMode", 1) $loggedon = (ProcessExists("explorer.exe") > 0) HotKeySet("^+!\", "_Exit") If $loggedon Then TraySetState() While 1        If (ProcessExists("explorer.exe") > 0 And Not $loggedon) Then ExitLoop        $ret = DllCall("WinInet.dll","int","InternetGetConnectedState","int_ptr",0,"int",0)        If $ret[0] then ; Connected                If $loggedon Then                        TraySetIcon(@ScriptName, -5)                        TraySetToolTip("Network connected")                Else                        ToolTip("Connected", 0, 0,"Network Status", 1, 5)                EndIf        Else            ; Not connected                If $loggedon Then                        TraySetIcon(@ScriptName, -6)                        TraySetToolTip("Network disconnected!")                Else                        ToolTip("Not Connected", 0, 0,"Network Status", 3, 5)                EndIf        Endif        Sleep(1000)WEnd Func _Exit()        ExitEndFunc
Attached is an archive containing the AutoIt3 code, executable and icons (used in the SysTray).

To work out whether there's a network connection all it does is ask Windows every second - this seems to work fine here whether it's wireless or wired.  So it'll know whether it's connected or not as soon as Windows knows (in theory).  It also means it doesn't need to call third party programs or need network access through a firewall.

You can exit the program by the hotkey combo: Control+Shift+Alt+\   (That should avoid any clashes :) )
Or just kill it in Task Manager.

Set it up in the Group Policy editor as in this post EXCEPT when it comes to the User Logon script entry, it needs no parameters.

It needs no config file since the only thing configurable would be the hotkey, the executable is the only file required and can be copied to the same places as mentioned in the post.

Sorry I couldn't give you exactly what you wanted techidave, I'm actually still surprised that Windows allowed me to put anything on the initial logon screen.

It's going to take the likes of mouser or f0dder to solve this problem :P

techidave:
Thanks for trying 4wd.  I know you gave it your all!  Thanks to Stoic Joker for all his input too!  Perhaps in the future it will be possible.  :)

Stoic Joker:
While not entirely the answer, I just ran across a very interesting structure (while researching something else (semi related)) in the VS2k5 Platform SDK:


--- Code: C++ ---DWORD GetIfEntry(  PMIB_IFROW pIfRow);
One of the members of the MIB_IFROW structure is dwOperStatus, which has these possible values:
ValueMeaning MIB_IF_OPER_STATUS_NON_OPERATIONAL LAN adapter has been disabled, for example because of an address conflict. MIB_IF_OPER_STATUS_UNREACHABLE WAN adapter that is not connected. MIB_IF_OPER_STATUS_DISCONNECTED For LAN adapters: network cable disconnected. For WAN adapters: no carrier. MIB_IF_OPER_STATUS_CONNECTING WAN adapter that is in the process of connecting. MIB_IF_OPER_STATUS_CONNECTED WAN adapter that is connected to a remote peer. MIB_IF_OPER_STATUS_OPERATIONAL Default status for LAN adapters 
 
I know there were other issues, but this looked handy enough to make a note of for future reference.

Navigation

[0] Message Index

[*] Previous page

Go to full version