Share internet via wifi using command line [closed]

Closed. this question is out of scope and is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 3 years ago .

improve this question

I have a wifi adapter, or it could be a notebook, and I share the internet via Wifi, this is not the problem, follows below how do I create a wifi network:

Create a wifi network

  1. access CMD as administrator;
  2. netsh wlan set hostednetwork mode=allow ssid=nomeHost key=senha
  3. netsh wlan start hostednetwork

With these steps I leave the wifi network to connect, and to give access internet by Network, Access Control Panel > Network and internet > Network connection.

After that, in the network properties via cable, the default, usually" Ethernet", in the Sharing tab, select the first and second option, and in the domestic connection select the local connection that it was created by the command, usually " local connection*", something like that.

Problem:
I would like to perform the sharing steps via the command line, because sometimes during the day I need to restart, because it simply stops working.

If anyone at least knows what I can use, some windows component. I don't want programs that do it for me, I want to do it myself.

Author: David, 2017-08-29

1 answers

Before knowing what a shell script is, it is important to know what is a Shell.

You will have to create a file of type*.bat and adds these commands in the file:

netsh wlan set hostednetwork mode=allow ssid=nomeHost key=senha
netsh wlan start hostednetwork

On Windows Boot, this will depend on the version of windows you are using, How to automatically run a BAT file when you turn on your computer

All the things you want to do from Connect share and view network you can add the commands in that file *.bat how to create a batch file .

 3
Author: Diogo Henrique Fragoso de Oliv, 2017-08-29 18:59:40