Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Two little batch files to create a cozy WiFi hotspot from the laptop Snatched from xda-developers, yet I don't remember the thread. Kudos to the author.

Woops! I forgot to mention that it is required to share the network connected to Internet with the Microsoft Virtual WiFi Miniport.

netsh wlan stop hostednetwork
pause
netsh wlan set hostednetwork mode=allow ssid=SSID_NAME key=PASSWORD
netsh wlan start hostednetwork
pause
@themakshter

This comment has been minimized.

Copy link

commented Oct 12, 2014

Are there no batch commands for sharing the network internet with the virtual wifi?

@sayol

This comment has been minimized.

Copy link

commented Feb 9, 2015

It is not work. The command prompt runs as a normal user only. But to start or stop hostednetwork we need administrator privilege. I already tested it. The message complained You must run this command from command prompt with administrator privilege

@pkhurana2010

This comment has been minimized.

Copy link

commented Jul 16, 2015

its simple just open that bat file with administrator privileges by right clicking on it and then run as administrator

@ignaciospisso

This comment has been minimized.

Copy link

commented Aug 18, 2015

Hi, To solve a bug regarding hosted networks that stop working all of the sudden in some devices, I created this one:

netsh wlan stop hostednetwork
netsh wlan set hostednetwork mode=allow ssid=REPLACEHOTSPOTNAME key=REPLACEHOTSPOTPASSWORD
netsh wlan start hostednetwork
exit

More automated and useful when you want to reset just having one file.

@JamesCullum

This comment has been minimized.

Copy link

commented Feb 18, 2016

Maintained and more detailed batch file at https://github.com/JamesCullum/Windows-Hotspot

@s56k

This comment has been minimized.

Copy link

commented Feb 19, 2016

I make something for me and friends, translated to english there is some extra code since some lines are used to translate standard english returns to croatian and can be skipped but dont have time now to change it all :)
Can be found at https://drive.google.com/file/d/0B5kagJ25dOxUN2JVOU5RY3FLR1k/view?usp=sharing

@hzaun

This comment has been minimized.

Copy link

commented Aug 16, 2016

Made a single batch file that does the same: https://github.com/hzaun/windows-wifi-hotspot

@MukeshGreenDeveloper

This comment has been minimized.

Copy link

commented May 20, 2017

u can even activate the administrator account in your pc or use any user with that privillages

First crate the batch file and place it somewhere else and copy the location and work as follows in the images hope it was helpful
12
3
4
5
6

@solraves

This comment has been minimized.

Copy link

commented Aug 16, 2017

Can somebody make a bat file to share the network from Ethernet to this hotspot,
sometimes I hibernate my PC while the hotspot was on, and when I wake PC up, I have to run the bat file again to start the hotspot, then I also have to go to network connections and open properties of ethernet, go to the sharing tab and deselect sharing, press okay and select sharing again for the internet to work on my phone.

This is very irritating to do again and agin

@aryabharat

This comment has been minimized.

Copy link

commented Dec 22, 2017

Can we use these files from a Cpp program? just like a program to create a hotspot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.