Web Analytics

Windows Guides Feed

Update: If you are not able to get it working, please post your question in the forum: Get help setting Windows 7 as a wi-fi hotspot in Windows Forums.

Windows 8 hotspot instructions

Windows 7 comes with a new feature for sharing your computers internet connection. Now, you can do it wireless. Well, As long as your system’s wireless network adapter supports Windows 7 “virtual wi-fi” feature, you can do it.

Next you need to check if your network card has the latest driver to support the feature. Intel, Broadcom, Realtek and some other NIC makers provide such drivers.

If the above conditions are met, you are good to read on …

The Commands – Step 1

Feel free to put the following commands into a .bat-file for simpler and faster usage.

  • Open an elevated command prompt (Type “CMD.EXE” in the start menu search bar, then right click the cmd.exe link and select “Run as Administrator”).
  • In the command window, type: netsh wlan set hostednetwork mode=allow ssid=MyNet key=MyPassword keyUsage=persistent
  • Replace “MyNet” with the name you want to use for the wireless network and replace “MyPassword” with your chosen password for accessing it)
  • Press Enter.
  • Now type: netsh wlan start hostednetwork
  • Press Enter.

Step 2 – You need only do this once (usually):

  • Open Control Panel and go to Network and Sharing Center.
  • Click Change Adapter Settings.
  • Right click your Internet connection and select Properties.
  • Click the Sharing tab.
  • Check the box that says “Allow other network users to connect.”
  • Choose your virtual Wi-Fi adapter and click OK.

Now Wi-Fi enabled computers within range should see your new wireless network and others can connect to it if they know the password.

Android Connectivity Problems

Some users report that they loose connectivity after a while. User M3n0 commented that one solution might be to add Static IP to your device. There are many free apps in the Android Market offering this kind of feature. I have not tested this myself as I don’t experience any problems what so ever on my device (yeah, yeah, bragging, I know). But please do, and let us know if it helps you.

If you don’t want this connection to remain permanent, remove the: “keyUsage=persistent” from the first command line.


#1: If you are not able to get it working, please post your question in the forum: Get help setting Windows 7 as a wi-fi hotspot in Windows Forums.

# 2: Some experience connectivity issues after rebooting the computer or device. This May be solved with a hotfix from Microsoft. Read More here.

# 3:  Edited the origial script, after a sugestion from ScuubZ: added: keyUsage=permanent. Removed due to complaints that it doesn’t work. Try to use: KeyUsage=Persistent.


About Thomas

Computer geek from the age of 7, which amounts to 30 years of computer experience. From the early days (when every computer company had their own OS) of DOS, Windows 1.0 through Seven...

Free PC tips by email

Search Windows Guides


142 thoughts on “Set Windows 7 as WiFi HotSpot [Quick Tip]”

  1. max says:

    Can you do this if your internet runs on a USB data card?

    1. Thomas says:

      @4e34ff2c83c6096408fa1eeabf2b8779:disqus Yes it is possible. I have done so myself using a portable usb Broadband connection.

  2. Lord Vader says:

    Thank you very much for your description. Works very well, saved our vacation:)

  3. Rich says:

    If you’re on a company-owned laptop (in a domain), it’s very likely Internet Connection Sharing (ICS) is disabled due to the security implications (tunneled access through your PC) it may present. It’s unlikely your IT department will change that for you, too.

  4. Ayaz says:

    That was really really helpful. Connectify, Virtual Router and software like those are crap. Even other pages guiding on enabling this feature manually in Windows 7 do not explain properly. However, with your guidance, I was able to create a hotspot on my troubled system (which was corrupted by so many wrong configurations tried earlier on).  Thanks a lot for putting up a good guide.

  5. Stefan says:

    its much easyer go to networksettings and select new connection wireless ad-hocnetwork and select internet connection allow and you computer is turned intro a wifi hotspot 

  6. Thomas says:

    yes it does.

  7. Suhail says:

    Things seem fine till this step,Click Change Adapter Settings.Right click your Internet connection and select Properties.,
    But i am unable to find the “sharing tab”, in my connected devices properties,

    Please help,

    I am using usb broadband connection.

    thanks in advance

  8. Vineet David says:

    Working good although speed is not that great. Will monitor for a while before posting my next review. Great help though….Thanks

  9. Shubham says:

    Works great….But can we change the network mode from n to g?

  10. Anonymous says:

    i have followed all the points went great but im stuck at the last part. i have ticked the box for “allow other network users to connect” but i cannot findwhere to select my new wifi and press OK? so far it is not working and just says not connected.

    help please?


  11. Aaa says:

    Great! After two days of unsuccessfull attempts to set up home wireless network I did it. Thnx a lot!

  12. Faysal says:

    i have activated but can’t brows from my mobile it is giving me message no gateway reply

  13. Blackberry user says:

    Thanks, my blackberry device now can detect this. however, i don’t want to use password and how to change the setting into ‘Public’ and not WPA2 Personal. (So i dont have to tell anyone in my house what is the password.) Thanks. nice articles by the way

    1. Thomas says:

      You could try to set the password to blank (none) when sending the netsh command. I would strongly recommend using a password. Remember it doesn’t have to be a very strong password, it can be as simple as “HI” or similar.

    2. Cee Jay says:

      You do realize “not having to tell anyone in your house” the password also means you don’t have to tell your neighbors the password? Anyone can connect to your hotspot without one and you could be held responsible for their actions online. Accept the inconvenience and simply give your fam the code :-)

  14. Adam van Wyk says:

    I love love love this post! Connectify would not allow me to connect to the internet with my android through my wireless broadband (which they now have as chargeable add-on) but this post sorted it out onetime! Good on you!

    1. Thomas says:

      Glad we’re able to help.

  15. Alaaf Zaki says:

    in android working not working for the psp!

  16. AnotherStrugglingStudent says:

    Love your post; a very interesting way to go.  Curiosity … *is* this the same as setting up a new AdHoc network in Windows 7?  thanks; keep up the good work!

    1. Thomas says:

      Arguably, you can say that this is the same as setting up an Ad-Hoc Network. Seeing as the post only deals with Sharing Internet Connection I chose to call it a HotSpot.

      Your question did inspire an article on the topic: “Ad-Hoc VS Hotspot, and what is Tethering anyway ?”, Look for it very soon.

      1. Rich says:

        I’m looking forward to that article. I’ve had a few people ask me that and it will be nice to have somewhere to point them :)

  17. John53smith says:

    my device is unable to get ip adress 

  18. Prajwal bhat says:

    guys i want to connect my lg optimus one to windows 7 wifi hotspot, i have already created a hotspot but when i try to connect, while getting IP address it gets disconnected automatically saying “Disabled while interface in use” ..
    Expecting some help!!! Thanks in advance :)

  19. Gautamanshul1987 says:

    hi this is the case with me also…. thomas can you help in this …

  20. tomalaD6 says:

    Hi!!!It works but i get stuck on access on my sgs2(using broadband stick on my laptop))
    *****In the command window, type: netsh wlan set hostednetwork mode=allow ssid=MyNet key=MyPassword

    Replace “MyNet” with the name you want to use for the wireless network
    and replace “MyPassword” with your chosen password for accessing it)*****
    Right- my wifi shows name of my network and my password as one name.
    I was trying to change it but still appears on networks name and still dont have an access on my phone even after entering my password(which de facto is visible on networks name)
    Thanx for help

  21. tomalaD6 says:

    I fixed a problem with network name(didnt input “key”after “MyNet”-:P) but when trying to connect on my phone and after typing a password connection still is blocked.heeeelp!!!!thanx

  22. ZaGaali says:

    Worked at Windows 8 developer preview too!! Thanks!

  23. Mete says:

    I had the same problem and realized that my wireless is closed. Opened it and problem solved.

  24. A016013C says:

    This worked amazingly well! Thanks…

  25. ScuubZ says:

    Thank you very much. I have been looking for a way to connect my phone to internet through my laptop for a long time. I have tried all other methods such as the ad hoc an the other softwares but hadn’t succeeded. This works perfectly. Also I have a suggestion . after key command add “keyUsage=permanent” to have the connection always.

    1. Thomas says:

      thank you for the tip.

    2. Thomas says:

      I added your suggestion to the original script in the article.
      Thank you again.

  26. Bry says:

    in this portion..
    Open Control Panel and go to Network and Sharing Center.
    Click Change Adapter Settings.
    Right click your Internet connection and select Properties.
    Click the Sharing tab.
    Check the box that says “Allow other network users to connect.”
    Choose your virtual wi-fi adapter and click OK.
    … I cant find a sharing tab in the properties. pls help

  27. Xenonforlife says:

    thank you so much it worked like a charm…but i have a few problems still which are as follows :-

    1. I have to start the wifi miniport manually using the start hostednetwork command in cmd… everytime i turn on the system, it is not connected automatically whenever my system is restarted or turned on. Please let me know what do I do to let it be connected at all times.

    2. When I connect another device with this miniport…it works perfectly for sometime and then it remains connected to the miniport however somehow it loses the internet connection. I am not able to figure out the reason behind this. Please help me out if u know the reason for the same.


    1. Thomas says:

      According to our reader ScuubZ, add: keyUsage=permanent
      after the key command to make it stick permanently.

      1. suprateek banerjee says:

        AFAIK keyUsage can take only persistent or temporary as values, I may be wrong please correct me if that is the case. But my problem is not solved as yet, would be really glad if someone could help. I will post what I am facing in detail, please be a bit patient as its too long..sorry..here goes:-

        I have established a Virtual Wifi Miniport and would like to share my laptops internet via the Miniport. Whenever I connect my android phone with this access point, it works perfectly for a few minutes and then all of a sudden there is no internet on the phone. The phone remains connected to the laptop hotspot but the internet access is no more there. Now at this point if I disconnect the connection between my phone and the hotspot and then again try to reconnect back again, it wont even connect. The phone will keep on searching and shows connecting status but can never connect. I have tried all sorts of softwares connectify, virtual router, intel mywifi  and even tried to create a hotspot from the cmd using netsh command. All the hotspots work in the exact same way intially works perfect but maybe after half an hour internet is gone. I have completed all the steps properly even changed the settings in the laptop adapter with interet access to allow other networks to connect but nothing seems to work. I have a Windows 7 Machine and my wireless adapter is Intel(R) Centrino(R) Wireless N-100 and the drivers are up to date according to windows. I know that its a problem with my laptop/OS or something because my android phone can connect and remain connected( without losing internet ) to the connectify hotspot in my wifi enabled desktop PC.I am breaking my head over this for the past 15 days even formatted my system once but no use. Please help if you can..please! 

        Xenonforlife and me are the same guy! :)

      2. Thomas says:

        Try downloading a Static IP App from Android Market: https://market.android.com/search?q=Static+IP+adress&so=1&c=apps.

        I’ll try the changes to KEYUSAGE that you suggest. Thank you

    2. Thomas says:

      1. the only suggestion I can come up with is to put the two commands into a .BAT-file and save it in the StartUp Folder under Programs.

      2. Try using static IP Adress if possible.

  28. Sujeet_kumar143 says:

    It really works Genius. Thank you. You should be given a noble prize in technology

    1. Thomas says:

      I could surely need the money :-)

  29. Sujeet_kumar143 says:

    please turn on your wi-fi for this 

  30. mohneesh wadhwani says:

    I am not able to optain Ip on android, not either on another laptop.

    1. Thomas says:

      Try downloading an app from Android Market that allows you to use static IP. https://market.android.com/search?q=Static+IP+adress&so=1&c=apps

      1. Maya says:

        sir i cant connect to my created hotspot, it always stucked in obtaining ip address using my android device

  31. ohno says:

    Why doesn’t the keyUsage=permanent work? It works if I leave it out although the internet connection will disconnect after a random period of time.

  32. chris says:

    Can I share the Internet connection without using Network and Sharing Center? I would like to put it to the *.bat file.

    1. Thomas says:

      The settings in “Network and Sharing Center” is something you only have to do once. Those settings will become permanent. After that you can put the commands in a .bat-file and it will work every time.

      1. chris says:

        Unfortunately in this case it isn’t working properly. Everything is ok for the first time. When I have checked option in “Change Adapter Settings” and then create hostednetwork something is going wrong. Host is connected but hasn’t access to the Internet. If I uncheck “Allow other network users to connect”  and check it again everything is fine. 
        (I tested it with disabled firewall.)

  33. Dr Rajjj says:

    Microsoft Windows [Version 6.1.7600]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

    C:Windowssystem32>netsh wlan set hostednetwork mode=allow ssid=krishna key=kri
    shna007 keyUsage=persistent
    The hosted network mode has been set to allow.
    The SSID of the hosted network has been successfully changed.
    The user key passphrase of the hosted network has been successfully changed.

    C:Windowssystem32>netsh wlan start hostednetwork
    The hosted network couldn’t be started.
    The group or resource is not in the correct state to perform the requested opera


    1. Thomas says:

      Have you tried to update the Wi-Fi drivers on your computer ?

    2. Constantin Catalin Buica says:

      It is because of the drivers, try to find the chipsets (wifi card chipset) generic drivers for win7, had the same problem with Atheros AR5005G microsoft drivers, it disconnects at first client connected, then gives the error you describe. Ive updated the drivers and works like a charm !

  34. March says:

    At last I managed to connect to my laptop with my android mobile, but still, I cannot open webpages or anything. Any suggestion?

  35. Mangkanor14 says:

    Thanks to this one the method works like a charm to me. :)

  36. Sven says:

    You can make a .bat file with the phrase “netsh wlan start hostednetwork” inside, and just run it when you want to use your laptop as a hotspot.

  37. Asdf says:

    to all of you having problems: some (most intel ones) wifi cards dont do the accesspoint mode. try “connectify” it will tell you.

  38. Life_4_freedom says:

    how about if i wanted to turn it off ?

  39. Liviu_almighty says:

    this work on pc?

  40. James says:

    Nice! I now package this in a shortcut to command prompt:

    Target [C:WindowsSystem32cmd.exe /c “netsh wlan set hostednetwork mode=allow ssid=MyNet key=MyPassword  keyUsage=persistent && netsh wlan start hostednetwork && pause”]

    From Properties=>Shortcut page:
    Tick [Advanced=>Run as Administrator]
    Icon from “%SystemRoot%System32WlanMM.dll”

    Hope this helps,
    James EJ @Jamedjo:twitter 

  41. Jenituringan says:

    Hi just tried this but the created wifi says No Internet Access.. please help

  42. Mark Goodman says:

    Excellent! Works like a charm. i9000 connected to internet through my usb modem. Thanks so much,

  43. SH says:

    That is awesome! thanks so much!

  44. Usman says:

    it works.. the connection is made but it doesnt give any network access.. :(

  45. Unique Ps says:

    Thank you so much this help me alot thank you thank you. You are a life saver

  46. Diane says:

    I have a lapto that my company was getting rid of I want to connect to my home wifi but I get a message that it is connected to a corporate wifi, how do I get around this?

  47. Kaye says:

    it worked properly but it will be disconnected suddenly. How can I reconnect? Any help? Thanks. :(

  48. D says:

    When I try to make changes in cmd.exe my Computer just restarts and doesn’t gives any changes.

  49. keronasser says:

    this is the message i got .. internet connection sharing cannot be enabled. a lan connection is already configuerd withe the ip address that is requierd for automatic ip address

  50. Niran says:

    The hosted network couldnot be started.The group or resources is not in the correct state to perform the requested operation

Comments are closed.

Computer tips in your inbox
Sign up for the Windows Guides newsletter to get PC tips and access to free Windows books (More details)

Subscribe now
Popular Guides

See which sites have been visited on your PC (even if private browsing mode is used)

Create a Windows 7 System Repair Disc

Best Free Anti-malware

Hibernate vs. Sleep vs. Shut-Down

i3, i5, and i7; Dual, Quad, Hexa Core Processors. How to they Differ?

Intel's Ivy Bridge Processor: new Features

Submit Your Tip
Submit your computer tip to us; receive full credit for all published tips

Windows Guides on Facebook