Win8 WIFI hotspot sharing

Source: Internet
Author: User

Win8 WIFI hotspot sharing

In win8 and win8.1, the wifi temporary hotspot function is canceled. It is no longer as convenient as Windows 7. (It may be in the security aspect) but it is not completely blocked. It can be enabled through command line. Next let's talk about how to start a Wi-Fi hotspot.

Manual steps

The netsh command is used to establish the bearer network. Win + x select the command prompt (administrator ).

First, create a bearer network, and enter

 
 
  1. netsh wlan set hostednetwork mode=allow ssid=fireskynetwork key=123456   

This command creates a bearer network. The password for fireskynetwork is 123456, and then the newly created bearer network is enabled.

 
 
  1. netsh wlan start hostednetwork  

In this way, the bearer network is established. You need to configure the network below.

 
 
  1. 1 Control Panel-> network and Internet-> network and sharing center click to enter
  2. 2. Click "Change adapter Settings" on the left and right-click "Microsoft managed network virtual adapter". In the displayed menu, click Properties;
  3. 3. Find the internet TCP/IP protocol from the list. 4. Double-click it to enter the window that sets the IP address to 192.168.0.1 mask 255.255.255.0;
  4. 4. Find the one that accesses the Internet using the "Ethernet" vro network cable.) Right-click Properties and click the sharing tab;
  5. 5. Check Before allowing other network users to pass the..., and then select the Wi-Fi hotspot you just created in the home network;

After the settings are complete, you can create a Wi-Fi instance. When you do not need WIFI, use the following command to stop the bearer network.

 
 
  1. netsh wlan start hostednetwork   

Gadgets

In view of some of my friends who suffer from severe command line phobia, I made a small tool. Can complete some work in GUI mode. You can easily create Wi-Fi hotspots through gadgets.

Note:

1 run as Administrator

2. jre environment required

For 3 64-bit systems, please use x64 32-bit systems, please use x86

Implementation

* Example of calling a command line in java

The method for calling the command line in java is as follows:

 
 
  1. String cmd = "cmd/c netsh wlan set hostednetwork ssid =" + tfSSID. getText () + "key =" + tfKey. getText (); // name of the command to be executed/c indicates that the command line is closed after execution.
  2. Runtime rtRuntime = Runtime. getRuntime (); // obtain the Runtime environment
  3. Try {
  4. Process process=rtRuntime.exe c (cmd); // execute the command
  5. BufferedReader br = new BufferedReader (new InputStreamReader (process. getInputStream (); // obtain the information printed by the command line
  6. String msg = null;
  7. String resultString = "";
  8. While (msg = br. readLine ())! = Null ){
  9. If (msg. contains ("required ")){
  10. JOptionPane. showMessageDialog (null, "This program must be run with administrator privileges ");
  11. Return;
  12. }
  13. ResultString + = msg; // The result is written to resultString.
  14. }
  15. Process. getOutputStream (). close (); // close the command line to print the information
  16. }

* Cmd command description

Cmd/c dir: Close the command window after executing the dir command.

Cmd/k dir does not close the command window after executing the dir command.

Cmd/c start dir opens a new window and executes the dir command. The original window is closed.

Cmd/k start dir will open a new window and execute the dir command. The original window will not close.

* Netsh command description

Netsh wlan show hostednetwork view the bearer network status

Netsh wlan set hostednetwork mode = disallow disable Bearer Network

Netsh wlan set hostednetwork mode = allow enable Bearer Network

Netsh wlan set hostednetwork ssid = firesky key = 123456 set the network name firesky password to 123456

Netsh wlan start hostednetwork open Bearer Network

Netsh wlan stop hostednetwork disable Bearer Network

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.