Python Forum
os.system("netsh interface set interface 'Wi-Fi' enabled")
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
os.system("netsh interface set interface 'Wi-Fi' enabled")
#11
(Jan-17-2019, 07:00 PM)nilamo Wrote: What happens if you run it with admin privileges, as it suggests?
The output is this without error and without doing anything. it doesn't do anything at all.
Output:
Process finished with exit code 0
Reply
#12
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.
Reply
#13
(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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  python command interface cwc2 5 1,210 Sep-20-2023, 05:19 AM
Last Post: Larz60+
  Help on the User Interface Afia 1 538 Jul-21-2023, 07:22 PM
Last Post: snippsat
  Keep trying link until enabled kamaleon 4 1,387 Jul-30-2022, 07:11 AM
Last Post: kamaleon
  user interface Button not working Frankduc 4 1,447 Feb-16-2022, 02:52 PM
Last Post: Frankduc
  how to startup canbus interface on pi korenron 2 2,217 Oct-24-2021, 09:51 PM
Last Post: DeaD_EyE
  Build a matrix by pressing buttons of an interface in Tkinter which extract data from juandiegopulla 1 1,945 Sep-13-2021, 07:28 PM
Last Post: deanhystad
  in a login interface when i try login with a user supposed to say test123 but nothing NullAdmin 3 2,259 Feb-20-2021, 04:43 AM
Last Post: bowlofred
  Difference between os.system("clear") and os.system("cls") chmsrohit 7 16,608 Jan-11-2021, 06:30 PM
Last Post: ykumar34
  Help with User Interface design code ai_masti 0 1,920 Nov-19-2020, 05:58 PM
Last Post: ai_masti
Question Difference between Python's os.system and Perl's system command Agile741 13 6,802 Dec-02-2019, 04:41 PM
Last Post: Agile741

Forum Jump:

User Panel Messages

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