Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7038541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:40:54+00:00 2026-05-28T01:40:54+00:00

A friend asked me for a program to switch his integrated wifi card off

  • 0

A friend asked me for a program to switch his integrated wifi card off and on. I’ve googled it with no luck. Can someone tell me if there’s any way to do that natively in python?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T01:40:55+00:00Added an answer on May 28, 2026 at 1:40 am

    Does the solution have to be native? I would use a utility called ‘devcon’ which is created by Microsoft. You could use Python to call devcon and parse the output and disable the required device(s).

    Here’s an example:

    http://en.kioskea.net/faq/1886-enable-disable-a-device-from-the-command-line

    You can get the list of network devices with

    devcon hwids =net
    

    You can try to parse the one with WiFi in it and the lines that start with PCI.
    Or you can do something like:
    devcon disable hwids =net, unfortunately this disables the ethernet devices as well.
    If you need to just disconnect from WiFi you can use netsh wlan disconnect

    EDIT: Ok, finally found the perfect solution (IMHO).
    You will need to install two packages pywin32 and wmi.
    Using WMI (Windows Management Instrumentation) bindings for Python this becomes pretty easy.

    import wmi
    cur=wmi.WMI()
    wireless_devices=cur.query("select * from Win32_NetworkAdapter WHERE NetConnectionID = 'Wireless Network Connection'")
    for device in wireless_devices:
        device.Disable()
    

    If it returns a tuple with the first value of (0) it succeeded. Obviously, this must be run as an administrator (otherwise you will get 5 as the return value).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A friend of mine was asked, during a job interview, to write a program
I can enumerate many features of functional programming, but when my friend asked me
This could be a little off the ballpark, but a friend asked me about
My friend asked me to make a registration software for his blood donation camp.
A friend asked me to add some dropdown menus to his site. It's here:
A friend asked me to update his shopping cart software. It's written in classical
My friend asked me to update a PHP application that his company uses. I
My friend is asked me to look over her site where there is an
One of my friend showed me this program and asked me why is i
A friend of mine, at work came to me and asked why he can't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.