(Jan-17-2019, 10:31 PM)nilamo Wrote: Are you sure it didn't do anything? If it succeeds, netsh
doesn't have any output, and an exit code of zero means success. For me, when I ran that, there was no output, but my wifi adapter had been disabled.
IT is Working now. Thanks
import os
import subprocess
os.system("netsh interface show interface")
# It will enabled Wi-Fi Network
subprocess.call(['netsh', 'interface', 'set', 'interface', 'Wi-Fi', 'enabled'])
Output:
Admin State State Type Interface Name
-------------------------------------------------------------------------
Disabled Disconnected Dedicated Wi-Fi
Disabled Disconnected Dedicated TPALAN
Process finished with exit code 0
Working Perfectly. Thank you