Windows Network Configuration Script

Source: Internet
Author: User
Tags goto

Static IP and dynamic IP switching

Applies to: The network environment of the company School Family Switch "please modify the specific IP address"

:: IP for Win7.bat
:: Win8 above please replace ip@echo off with IPv4Echo 1set to static IPEcho 2set to dynamic IP set/P answer=if%answer%==1Goto1 if%answer%==2Goto2 :1netsh interface ip set address"Local Connection"Static222.222.222.222 255.255.255.0 222.222.222.1netsh interface ip set DNS"Local Connection"Static192.168.10.8primarynetsh Interface IP Add DNS"Local Connection" 192.168.10.9Pausegoto End:2netsh interface ip set address"Local Connection"dhcp netsh interface ip set DNS"Local Connection"DHCP Pause

ADSL dialing

Add boot entry to enable automatic dial-up internet access

:: Adsl.batcd c:\windows\system32rasdial Broadband Connection account Passwordpause

Wireless AP Boot

No need to install software to realize notebook shared WiFi

:: Wireless AP Launcher program. Bat@echo offtitle WIN7 Virtual ap function: OKEcho. ECHO option 1, activate the wireless AP feature and only need to run once. Once run, you will not have to run it later. ECHO option 2, after you run option 1, run option 2. ECHO in the ADSL attribute, "Allow other Internet users to connect through this computer's Internet connection" tick, select local connectivity 12, and then the below "Allow other Internet users to control or disable the Internet connection," "Uncheck the link.". ECHO option 3, if you are not in need of a wireless network, run option 3. Echo 1. Turn on the WIN7 virtual wireless AP FeatureEcho 2. Bearer NetworkEcho 3. Exit the Hosting networkEcho 4. Display deviceEchox. ExitEcho. Set/P variable=Please enter the corresponding serial number (enter X key to exit):if%variable% = =1Goto A1if%variable% = =2Goto A2if%variable% = =3Goto A3if%variable% = =4goto A4if%variable% = =x Goto EXIT:A1Echostart setting up virtual APs, wait a moment .... netsh wlan set hostednetwork mode=allow ssid="Ssid-name"Key=password12345678goto:ok:a2clsnetsh WLAN start Hostednetworkgoto:ok:a3clsnetsh WLAN stop hostednetworkgoto:ok:a4clsnetsh WLAN show H Ostednetworkgoto:ok

Windows Network Configuration Script

Related Article

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.