Bat batch processing changes the hosts file and adds a trusted site

Source: Internet
Author: User

Recently, some projects developed by the company need to run controls and DNS ing. users do not modify hosts files and trusted sites by themselves. Therefore, we have written a bat batch to modify hosts files and add trusted sites, the procedure is as follows:

: Add IP ing to change the hosts file
Type C:/Windows/system32/Drivers/etc/hosts
Type C:/Windows/system32/Drivers/etc/hosts | find "bieeserver" & goto Yes
: Echo 10.5.31.58 bieeserver> ""
Echo 10.5.31.58 bieeserver> C:/Windows/system32/Drivers/etc/hosts
: Yes

: Change the Registry to add Shenyang outlook software Co., Ltd. WP as a trusted site
Del C:/fosoft. Reg
Echo Windows Registry Editor Version 5.00> C:/fosoft. Reg

Echo [HKEY_CURRENT_USER/software/Microsoft/Windows/CurrentVersion/Internet Settings/zonemap/domains/forsoft.cn]> C:/fosoft. Reg

Echo [HKEY_CURRENT_USER/software/Microsoft/Windows/CurrentVersion/Internet Settings/zonemap/domains/forsoft.cn/appserver]> C:/fosoft. Reg
Echo "*" = DWORD: 00000002> C:/fosoft. Reg

Echo [HKEY_CURRENT_USER/software/Microsoft/Windows/CurrentVersion/Internet Settings/zonemap/domains/forsoft.cn/fwp]> C:/fosoft. Reg
Echo "*" = DWORD: 00000002> C:/fosoft. Reg

Echo [HKEY_CURRENT_USER/software/Microsoft/Windows/CurrentVersion/Internet Settings/zonemap/domains/forsoft.cn/wp]> C:/fosoft. Reg
Echo "*" = DWORD: 00000002> C:/fosoft. Reg

Regedit/s c:/fosoft. Reg

Del C:/fosoft. Reg

Pause & Exit

 

 

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.