In a recent article, I explained how to share Wi-Fi in Windows 8. Some readers asked how you can turn Windows 8 into a hotspot right after startup.
Avatar
Latest posts by Michael Pietroforte (see all)

Considering that more and more users want to connect their mobile devices to the Internet at work, offering Wi-Fi is now a must in many organizations. If you only have LAN in your offices, it can get quite expensive if you have to install Wi-Fi routers everywhere in the building. A cheaper solution is to use Windows PCs as hotspots. I use the setup explained here when I connect my laptop to a hotel LAN to share Internet with my phone.

My first idea was to put in the Windows startup folder a batch script containing the command that starts the hotpot. The problem is that the netsh command needs administrator privileges and has to be elevated. I described in the 4sysops forum how to do this at startup; however, it is all a bit longwinded.

A reader reminded me of a much better way. You can leverage the powerful Windows Task Scheduler, one of the many great features introduced with Windows Vista. With the solution described here, you only have to switch on the Windows machine you want to use as a hotspot; the user of the PC doesn’t need admin rights, and nobody needs to log on.

Note: Before you follow the step-by-step guide below, you must perform, at least once, the steps in my guide for how to share Wi-Fi in Windows 8.

  1. Create a batch file with the contents below (you might want to change the security key) and store it in the location of your choice:
     netsh wlan set hostednetwork mode=allow ssid=hotspot key=12345678 keyUsage=persistent
     netsh wlan start hostednetwork
  2. Type Task… on the Windows 8 Start screen and then run the Task Scheduler.
  3. Click Create Task in the Actions pane on the right hand side.
    Task Manager - Create new task
  4. Enter Hotspot as the name for the task, and select Run whether user is logged on or not and Run with highest privileges. Select a user account with administrator rights under When running the task, use the following user account. You will have to enter the password after you confirmed the account.
    Enter task name
  5. On the Trigger tab, click New, select At startup under Begin the task, and then click OK.
    New Trigger
  6. On the Action tab, click New, select Start a program as Action, choose the batch file you created in step 1, and click OK.
    New Action
  7. On the Conditions tab, deselect Start the task only if the computer is on AC power (just to be sure, if the hotspot is a laptop or tablet), and click OK.
    Conditions

You should now see your new task in the Task Scheduler Library. After you reboot, your Windows 8 machine acts like a Wi-Fi hotspot. If it doesn't work, you can Enable All Tasks History in the right pane of the Task Scheduler. The History tab of the task will help you to troubleshoot.

Hotspot in Task Manager

Hotspot in Task Manager

You can also do something similar with a Group Policy startup script.

7 Comments
  1. Avatar
    didiek 10 years ago

    i was test step by step above…. with windows 8 x64bit
    but share Net connection2 to net connection13 can’t WORK…..
    client PC can conected and open share folder… but it can’t browsing for internet 🙁

  2. Avatar

    didiek, please notice that the number of the network connection is different on every PC as it depends on the number of adapters you have installed. So don’t rely on the numbers used in the guide but on the description of the network adapter’s role.

  3. Avatar
    Aurora 10 years ago

    Does this include resuming from sleep?

  4. Avatar

    Aurora, the batch file will only run when the computer boots up. However, in theory after that if the computer resumes from sleep internet sharing should still work. Did you have problems with that?

  5. Avatar
    ylli 10 years ago

    I follow these setps but at last i have a problem when i click ok to save my settings it’s shows to
    Enter my account password i dont have my computer with any pasword protect http://i.imgur.com/yJASJyx.png
    but in this box if i want to change user it’s shows my email i click it and i enter my password
    http://i.imgur.com/ywlGhBT.png
    And it’s gives an errorr http://i.imgur.com/6sW6eO2.png can somehone help me ?

  6. Avatar

    ylli, did you try to set a password for your account?

  7. Avatar
    Alec 8 years ago

    Do you really need to add wlan set or you can just do wlan start and skip all set row?

Leave a reply

Please enclose code in pre tags: <pre></pre>

Your email address will not be published. Required fields are marked *

*

© 4sysops 2006 - 2023

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account