Python Forum
Disable - Network adapters
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Disable - Network adapters
#1
Hi! I want to make a GUI application where I can 'Enable' or 'Disable' network adapters. Any way to bypass 'run as administrator'? or another solution?
I have a problem with the code below:
-Invalid Verb.
-The requested operation requires elevation (Run as administrator).



import os
os.system('netsh interface show interface')


def disable():
    os.system("wmic path win32_networkadapter where index = 1 call disable")
    os.system("netsh interface set interface Wi-Fi disable")


disable()
Reply


Forum Jump:

User Panel Messages

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