Hello i have been playing around with python recently and have been trying to learn how to control external peripherals and i/o ports on my laptop.
I have been trying to disable USB ports and disable my network adapter. However when i run my program it does not work. The code does not have a specific syntax error but when it is ran nothing happens.
import subprocess
def main():
print("PROGRAM STARTED")
subprocess.call(["runas", "/user:Administrator", "cmd.exe /c netsh interface set interface '*' admin=disable"])
print("Program Exited")
if __name__ == "__main__":
main()