M
M
Maxim Siomin2021-02-24 17:49:54
WiFi
Maxim Siomin, 2021-02-24 17:49:54

How to disable wifi?

I need to make a script that disables Wi-Fi on a PC
Not the Wi-Fi adapter itself, but disable the Wi-Fi NETWORK (do not forget, just disable)
I googled, for example https://www.google.com/search?q=turn+ off + wifi + nerw ...
Everywhere they write about turning off the adapter, but I just need to turn off the network
How can I do this?
Language suitable c#, python, c++, java, c

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Ilya, 2021-02-24
@New_Horizons

netsh wlan disconnect

R
rPman, 2021-02-24
@rPman

What does it mean to disable the network without disconnecting the adapter?
Run netsh/route/... system applications from your program and analyze the output
To make the network stop working and not turn off the Internet, you can break its settings, the easiest way is to delete the default gateway (route delete ip_router command, you need administrator rights and disable automatic assigning an ip address by setting the Internet settings as static, otherwise the settings will return to the correct ones automatically after a while).

I
Ilya bow, 2021-02-25
@8889996

netsh interface set interface "Беспроводная сеть" disable
netsh interface set interface "Беспроводная сеть" enable

The main checkbox to connect automatically uncheck.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question