How to turn on WiFi adapter from command line / How to turn on hotspot


  1. Posts : 92
    Windows 7 x64
       #1

    How to turn on WiFi adapter from command line / How to turn on hotspot


    Hi

    I have configured ad-hoc network for internet sharing from my PC. Normally I start it by
    netsh wlan start hostednetwork
    As I noticed the hotspot is automatically turned off when I turn off WiFi adapter. So I have two questions:

    How do I turn on WiFi by command line, so that I can control it from various commandline scripts?
    How do I configure the script for WiFi for autostarting hotspot whenever WiFi is turned on?

    netsh wlan ...
      My Computer


  2. Posts : 8,870
    Windows 7 Ult, Windows 8.1 Pro,
       #2

    Anakunda said:
    Hi

    I have configured ad-hoc network for internet sharing from my PC. Normally I start it by
    netsh wlan start hostednetwork
    As I noticed the hotspot is automatically turned off when I turn off WiFi adapter. So I have two questions:

    How do I turn on WiFi by command line, so that I can control it from various commandline scripts?
    How do I configure the script for WiFi for autostarting hotspot whenever WiFi is turned on?

    netsh wlan ...
    Ad-Hoc requires that you restart the session each time.

    Connectify pro has an auto start option that does this but it's a paid version, connectify lite is free but I'm not sure if has auto start.

    Download - Connectify
      My Computer


  3. Posts : 92
    Windows 7 x64
    Thread Starter
       #3

    chev65 said:
    Connectify pro has an auto start option that does this but it's a paid version, connectify lite is free but I'm not sure if has auto start.

    Download - Connectify
    Unfortunatelly I don't have any good experience with Connectify,
    1.it still refuses leaked key
    2.actually it won't too autostart hotspot once WiFi is lost.
    At best I'd like to avoid any 3rd party software.
    There's some scripting on netsh wlan dump, what about using this?
      My Computer


  4. Posts : 562
    Windows 7 Professional x64 SP1
       #4

    Just bookmark this article and you'd be good to go: About the Wireless Hosted Network (Windows)
      My Computer


  5. Posts : 92
    Windows 7 x64
    Thread Starter
       #5

    That's good info about wireless net sharing but still no see how to either start the adapter from command line or at least run this starting hosted network command unattended each time when Wi-Fi adapter is started (whichever method), a kind of assigning custom command to this event.
      My Computer


  6. Posts : 10,485
    W7 Pro SP1 64bit
       #6

    I'm not sure what you mean by starting an adapter....

    You can enable/disable an adapter via command line and netsh.
    Is that what you want?
      My Computer


  7. Posts : 92
    Windows 7 x64
    Thread Starter
       #7

    I'm not sure if enable/disable adapter is the same as turn it on/off such as pressing FN+F2, I don;t want to disable the driver fully.
      My Computer


  8. Posts : 10,485
    W7 Pro SP1 64bit
       #8

    It just disables the adapter. It does the same thing that would happen if you right clicked on an adapter and selected Disable or Enable from the context menu:

    How to turn on WiFi adapter from command line / How to turn on hotspot-netsh.png

    For the adapter shown above, this code would disable/enable it:

    Code:
    netsh interface set interface name="Local Area Connection" disable
    Code:
    netsh interface set interface name="Local Area Connection" enable
    For your usage:
    Replace Local Area Connection with the name of your adapter.
    (Maybe Wireless Network Connection.)
    Last edited by UsernameIssues; 04 Aug 2015 at 04:16.
      My Computer


  9. Posts : 1
    win 7 home
       #9

    i hav hcl note book win 7 32 bit showing wifi symbol but not on (a cross symbol ) how to turn on wifi
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 19:32.
Find Us