Link to home
Start Free TrialLog in
Avatar of f_o_o_k_y
f_o_o_k_yFlag for Poland

asked on

How to display message at windows logon screen?

Hello,
We have problems with user that are disconnecting network cable form our desktop computers.
If another user wants to use computer he/she cannot login because there is no network connection with domain controller.
"There are currently no logon servers available to service the logon request" is meaningless for most of our users :)
So we figured out that it would be very useful if there will be some other text on the windows 7 logon screen (GINA?) when the network cable is disconnected.

Maybe I can write some Windows Service or some kind of plugin or extension for GINA?

Maybe someone have an idea how to do this?

Thanks in advance.
Avatar of DavidGerald
DavidGerald

I am not sure how to change the error message, I would think you would have to take apart the dlls in question.  

Another option would be to add a legal notice on startup telling them to check their network connection, or less intrusively you could change the logon backgroup to include a note in the corner saying check your network connection.
You could perhaps compile this Autoit script which checks the connection and then put it into the startup folder of each machine.

$IsCon=DllCall("WinInet.dll","int","InternetGetConnectedState","int_ptr",0,"int",0)
    If $IsCon[0]=0 Then
MsgBox(16, "NO CONNECTION", "Please Check Your network cable before continuing")
    exit
endif
You could also perhaps amend this script which pings a destination and returns the result if unreachable prompts user to check network cable! Again an autoit script that needs compiled and dropped into startup folder.

Dim $i
$Ip2ping= "192.168.xx.xx"  ; Or whatever IP you wish ping
for $n=1 to 5
$Rs = Ping ($ip2ping,250)
If @error = 0 Then
Msgbox(0,"Ping " & $n & " of 5","Response from " & $ip2ping & " in "& $rs & " ms",1)
elseif @error = 1 Then
Msgbox(0,"Ping " & $n & " of 5", $ip2ping & " is offline please check cable",3)
elseif @error = 2 Then
Msgbox(0,"Ping " & $n & " of 5", $ip2ping & " is unreachable check cable",3)
elseif @error = 3 Then
Msgbox(0,"Ping " & $n & " of 5", $ip2ping & " is a bad destination",3)
Else
Msgbox(0,"Ping " & $n & " of 5", "Unknown error encountered",3)
EndIf
$i=$rs + $i
next
Msgbox (4096, "Results", "Average roundtrip time: " & $i / 5 & " ms")
Avatar of f_o_o_k_y

ASKER

Hi,
DavidGerald do you have some examples of that?
by the way I have problem with changeing backgroud of logon screen (after windows updates) background is restored to previos default background.

ambientguitar
Startup script will run only once during the startup. But what if some user disconnected cable after computers has started?
ASKER CERTIFIED SOLUTION
Avatar of DavidGerald
DavidGerald

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks. that was it.
Now I can change background JPG file and restart LogonUI.exe using my networkDetection Service