1

I'm temporarily living in a place with no WLAN router and rely on WLAN hotspot on my Windows 11 laptop. As such, I want to turn on hotspot automatically on when I login or when hotspot for whatever reason was turned off (I've turned off energy saving mode but just in case).

The popolar answer on Google search does not work for me. If I run command (as admin)

netsh wlan start hostednetwork //start hotspot

I get an error:

The hosted network has not started.
The group or resource is not in the right state for this operation.

Whereas clicking WLAN hotspot icon in notification bar works normally.

user167420
  • 182
  • 2
  • 15

1 Answers1

0

The command syntax is rather :

netsh wlan set hostednetwork mode=allow ssid=ssidName key=your8characterPassword

Unfortunately it must be run with elevated permissions. so you cannot run it automatically as a startup program.

I suggest using the Task Scheduler to create a task that will run a .bat file that contains this command in elevated mode after the boot. Add also a delay to run it enough seconds after the boot, for Windows to settle down and enter a normal mode of working.

There are many articles on internet on using the Task Scheduler. For example:
How to create an automated task using Task Scheduler on Windows 10.

harrymc
  • 455,459
  • 31
  • 526
  • 924
  • I get the success message but the hotspot is NOT started. `The hosted network mode is set to allow the hosted network. The SSID of the hosted network has been changed successfully. The hosted network user key passphrase was successfully changed.` – user167420 Mar 10 '22 at 23:09
  • This is surprising. Have you used a tool or app that can detect nearby networks? Note that the hotspot created by a computer will be very much weaker than one created by a real router/access-path. – harrymc Mar 11 '22 at 09:23