Jump to content

Recommended Posts

Posted (edited)

Hi all,

 

Some students are disabling WiFi on our Lenovo laptops using the Fn + F8 keys. It started as the odd laptop once every blue moon but seems like a student has passed word around how to disable it. Anyone have this problem in their school?

 

It's causing the next student to log on to get the "no logon servers available..." message as they try and login. I know this message can also caused by other problems like I've read on other threads but this is definitely due to the pupils deliberately altering the setting. I'd love to be able to stop them from pressing this combination without altogether blocking the Fn keys for them.

 

Any advice?

 

Thanks

Paul

Edited by toffee_paul
Posted

We have Dell laptops, which often have a hardware switch on them to disable WiFi and Bluetooth. We have an option in BIOS to say which radios, if any, and controlled by that hardware switch. For student laptops, we set the hardware switch to control none of them (i.e. make the switch useless), for precisely this reason.

 

Either have a look in BIOS, or failing that, some kind of Lenovo driver/utility in Windows.

Posted
Unfortunately there's nothing in the BIOS, this was the first place I looked (sorry I should have mentioned this in original post). There's only the ability to enable/disable WiFi entirely which is obviously not what I need! I'll have another dig around and see if there's a software setting in the O/S. It must be something running before the login screen though.
Posted

You could get BGInfo to report the computer's IP on the user's desktop, and on the logon screen. That way you can see just by looking if the WiFi is on and if the computer has a connection.

 

Doesn't stop them doing it though.

Posted

It's odd, Lenovo have released a 'Hotkey Integration Package' for this model and other models but all it seems to do is change the default behaviour of the top row keys. It doesn't actually offer any way to disable the special functions of the keys themselves.

 

I may try the log off script/PowerShell method. This site looks like a good place to start. Should be able to get this running at log off or may try and put it on a timer so say every 30 seconds it checks the state of the WiFi connection and if enabled do nothing else enable it.

Posted (edited)
I may try the log off script/PowerShell method. This site looks like a good place to start. Should be able to get this running at log off or may try and put it on a timer so say every 30 seconds it checks the state of the WiFi connection and if enabled do nothing else enable it.

 

Is that necessary? If it's off, then the culprit is likely satin front of the machine.

 

It looks like the PS script needs admin permissions. Just did something to check connectivity on the laptop that runs our display screen as it occasionally drops the wireless and doesn't pick up the Powerpoint it runs until after a reboot. (Guess I could script a periodic copy to local storage but it's also displaying an IP camera).

 

 @echo off
:loop
TIMEOUT /T 600 /NOBREAK
ping [url]www.google.com[/url] -n 1 -w 5000 >NUL
if errorlevel 1 shutdown -r
goto Loop

 

This waits 10 mins, pings Google and if no reply restarts - otherwise loops around.

 

If you replace the restart with

 


netsh interface set interface "Wireless Network Connection" Enable

 

I think

 

@ echo off
ping [url]www.google.com[/url] -n 1 -w 5000 >NUL
if errorlevel 1 netsh interface set interface "Wireless Network Connection" Enable
exit

 

should work? Bung the loop stuff back in for a periodic test.

 

Haven't tested, though!

Edited by LeMarchand
Posted

You're right, that looks like it would work but for those occasions where the guilty party logs off THEN uses FN+F8 to disable the WLAN, it would not work.

 

I've had a very quick look at Win Task Scheduler and creating a task which looks for events that are triggered by the WLAN being disabled. This looked promising after I simulated it by disabling the WLAN and getting the task to run a batch file to re-enable it. Problem is, the Fn+F8 combo doesn't actually disable the WiFI in the traditional sense, it enables Airplane Mode. It looks like a 'soft disable', a way to enable/disable that's quicker than the traditional Windows way of doing it, either by GUI or netsh interface set interface "Wireless Network Connection" Enable/Disable

 

About to have a look to see if there's anything else in Event Viewer that I can work with.

Posted
You're right, that looks like it would work but for those occasions where the guilty party logs off THEN uses FN+F8 to disable the WLAN, it would not work.

 

Ah! I shouldn't have assumed that Fn=F8 only worked when logged in!

 

Couple of posts near the bottom of this page that may be of use: https://social.technet.microsoft.com/Forums/en-US/ba2971e4-3306-4bb2-ace3-91e29feca934/win10-disable-airplane-mode-group-policy-registry-etc?forum=win10itpronetworking

Posted (edited)

I've used this app to achieve something similar, but I have a feeling it may not work for what you want - definitely worth a try.

Take a look at SharpKeys - SharpKeys - Home

 

Launch the App, click Add, then on the left-hand side click on Type Key and press the key combination you want to 'trap'.

On the right-hand side you would probably choose 'Turn Off'.

 

Write the Registry, reboot and see if that has stopped it.

For reference, and easy deployment, the registry settings are stored in

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"

Edited by mrwoberts
Posted

 

netsh interface set interface "Wireless Network Connection" Enable

 

Don't think there would be any need for the ping loop etc. No harm is being done by executing the command even if it is enabled

 

Not tested this and I think it would work...

I would create a group policy that creates a local schedule task on the computer during log off and startup to run the above command that lemarchand commented

 

Then if the student were to disable it whilst logged on the local task will reenable it on log off.

 

If they disable it at the log on screen

Maybe at this point you could put a sticker on laptop say no logon servers? restart me! Or something like that. The local task scheduler will run the cmd in theory before the network services run.

 

Think if that works then the number of callouts should reduce and turns a callout into the famous quote turn it off and back on again 😂

Posted

I had a similar issue years ago, I dug up these commands from my old scripts and GPOs. This was windows 7 32bit and the key was FN+F5. The laptops had a utility called Access Connections.

 

Uninstall Access Connections the guid is most likely different now but here is what was in my script.

MsiExec.exe /qn /norestart /X{8E537894-A559-4D60-B3CB-F4485E3D24E3}

I also had these two files to be deleted by GPP, they were the exe's behind the FN+F5 key, perhaps you can find something similar on your systems.

C:\Program Files\Lenovo\HOTKEY\TpFnF5.exe
C:\Program Files\Lenovo\Access Connections\AcFnF5.exe

Posted

I found that the Fn+F8 key launched a file called TpFnF5.exe in the C:\Program Files\Lenovo\HOTKEY\ folder as @ADMaster mentions. Access Connections is not installed on any of our laptops.

 

After some rigourous testing on Friday it seemed that the only way to prevent pupils from accessing Airplane Mode was to block access to the TpFnF5.exe file itself. The reason for this being that there is no way (that I can see) of turning the Airplane Mode off without using the OSD that appears when Fn+F8 is pressed. TpFnF5.exe has command line parameters such as /WLON, /WLON, BTON, BTOFF, ALLON, /ALLOFF for individual control the WiFi and Bluetooth radios but none of the command override the Airplane Mode master switch. The file doesn't have a parameter to turn Airplane Mode on or off. I was hoping that if a pupil enabled Airplane Mode, a Windows task I created would detect it, run the TpFnF5.exe file with a /AIRPLANEMODEOFF parameter thereby undoing their actions but unfortunately there is no such parameter.

 

I've took the heavy-handed approach and created a Group Policy object to rename the TpFnF5.exe file making in inaccessible when Fn+F8 are pressed. Thankfully, there is no "file not found/cannot launch TnFnF5.exe" prompt, it just does nothing which is ideal. As the file has only been renamed and not deleted it's pretty straightforward to revert back if needed.

Posted

I found that the Fn+F8 key launched a file called TpFnF5.exe in the C:\Program Files\Lenovo\HOTKEY\ folder as @ADMaster mentions. Access Connections is not installed on any of our laptops.

After some rigourous testing on Friday it seemed that the only way to prevent pupils from accessing Airplane Mode was to block access to the TpFnF5.exe file itself. The reason for this being that there is no way (that I can see) of turning the Airplane Mode off without using the OSD that appears when Fn+F8 is pressed. TpFnF5.exe has command line parameters such as /WLON, /WLON, BTON, BTOFF, ALLON, /ALLOFF for individual control the WiFi and Bluetooth radios but none of the command override the Airplane Mode master switch. The file doesn't have a parameter to turn Airplane Mode on or off. I was hoping that if a pupil enabled Airplane Mode, a Windows task I created would detect it, run the TpFnF5.exe file with a /AIRPLANEMODEOFF parameter thereby undoing their actions but unfortunately there is no such parameter.

I've took the heavy-handed approach and created a Group Policy object to rename the TpFnF5.exe file making in inaccessible when Fn+F8 are pressed. Thankfully, there is no "file not found/cannot launch TnFnF5.exe" prompt, it just does nothing which is ideal. As the file has only been renamed and not deleted it's pretty straightforward to revert back if needed.

Posted
I've made this a behaviour issue and as we only have 2 models of laptop across the whole school now - staff included - literally everyone knows how to turn the wifi on because there are emails and posters about it.
Posted (edited)
I did consider taking a simalar approach, but as we are an SEN school there were a few other factors to consider and in the end decided it best to remove access to Airplane Mode altogether. Edited by toffee_paul
Posted

@toffee_paul

 

Back to the Event Log idea, how about the [Microsoft\Windows\WLAN-AutoConfig\Operational] log - event ID 8003 when you disconnect from a network.

I guess you'd either need to trigger a reboot for that event or find someway to re-enable the WiFi.

Posted
Yeah I looked at that event IS and noticed it was which is logged when the WLAN has disconnected but I was still having the same problem, getting Airplane Mode disabled. that's why I went with removing access to the file that launches instead.
Posted

Gotcha.

Reading your method above it looks like the TpFnF5.exe /ALLON command would switch the radios back on - presumably the exe is called with /ALLOFF when the pupil presses FN+F8. If you wanted to, you could combine that with the event log method to restore connectivity.

Anyways, glad you've got a solution.

Incidentally, just been reading that there is a 'Airplane Mode Switch' device in device manager. Disabling that device apparently disables the Airplane Mode switch...

Posted (edited)
it looks like the TpFnF5.exe /ALLON command would switch the radios back on

 

That's what I thought too when I first found the the command line paramenters on a forum post on the Lenovo website. Unfortunately the /ALLON and /ALLOFF don't actually enable/disable Airplane Mode. When Airplane Mode is disabled, /ALLON and /ALLOFF can be used to enable/disable WiFI and Bluetooth radios but when Airplane Mode is enabled, /ALLON and /ALLOFF have no effect. As previously mentioned, it's like Airplane Mode is a 'master switch' and the command line parameters don't override it. The onyl way to disable Airplane Mode once enabled is to press Fn+F8 and click the Enable button on the OSD. Think of it like your consumer unit at home, it you switch off your electricity by your main circuit breaker, it doesn't matter if you flick up or flick down

 

Incidentally, just been reading that there is a 'Airplane Mode Switch' device in device manager. Disabling that device apparently disables the Airplane Mode switch...

 

Not on these Lenovo's unfortunately, that would be too easy wouldn't it! :)

 

 

 

UPDATE: Although I'm happy to have this working, I thought I'd test a little more and try to use Impero to block access to the file. Although the block works when the file is manually double-clicked on, it doesn't block when the keyboard shortcut is used to launch the file. Double-clicking the file isn't possible for the pupils anyway as they can't see the C:\ drive and have no access to run/command prompts.

Edited by toffee_paul

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...