Python Forum
How to rename Network Interface name
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to rename Network Interface name
#4
To disable Wi-Fi
>>> import subprocess
>>> subprocess.call(['netsh', 'interface', 'set', 'interface', 'name="Wi-Fi"', 'admin="DISABLED"'])

0
You need to run cmd in elevated mode (i.e. Run As Administrator)
Change the name if the adapter name is not Wi-Fi, e.g. Wireless Network Connection, etc.

Use this as example how to rename interface
>>> subprocess.call(['netsh', 'interface', 'set', 'interface', 'name="TPALAN"', 'newname="TPALAN2"'])
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
RE: How to rename Network Interface name - by buran - Jan-30-2019, 04:54 PM
RE: How to rename Network Interface name - by buran - Jan-30-2019, 05:33 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  os.system("netsh interface set interface 'Wi-Fi' enabled") aniyanetworks 12 10,515 Jan-18-2019, 04:07 AM
Last Post: aniyanetworks

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020