|
- @echo off
- >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
- if '%errorlevel%' NEQ '0' (
- goto UACPrompt
- ) else ( goto gotAdmin )
- :UACPrompt
- echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
- echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
- "%temp%\getadmin.vbs"
- exit /B
- :gotAdmin
- if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
- pushd "%CD%"
- CD /D "%~dp0"
- echo 127.0.0.1 localhost >> %windir%\system32\drivers\etc\hosts
- echo 120.52.19.113 pcbeta.com >> %windir%\system32\drivers\etc\hosts
- echo 120.52.19.113 uc.pcbeta.com >> %windir%\system32\drivers\etc\hosts
- echo 120.52.19.113 m.pcbeta.com >> %windir%\system32\drivers\etc\hosts
- echo 120.52.19.113 mac.pcbeta.com >> %windir%\system32\drivers\etc\hosts
- echo 120.52.19.113 static.template.pcbeta.com >> %windir%\system32\drivers\etc\hosts
- echo 120.52.19.113 web.pcbeta.com >> %windir%\system32\drivers\etc\hosts
- echo 120.52.19.113 i.pcbeta.com >> %windir%\system32\drivers\etc\hosts
- echo 120.52.19.113 bbs.pcbeta.com >> %windir%\system32\drivers\etc\hosts
- echo 120.52.19.113 www.pcbeta.com >> %windir%\system32\drivers\etc\hosts
- echo 120.52.19.113 cdn.pcbeta.attachment.inimc.com >> %windir%\system32\drivers\etc\hosts
- echo 120.52.19.113 cdn.pcbeta.static.inimc.com >> %windir%\system32\drivers\etc\hosts
- echo 120.52.19.113 cdn.pcbeta.css.inimc.com >> %windir%\system32\drivers\etc\hosts
- echo hosts文件修改完成
- ipconfig /flushdns
- echo DNS缓存已刷新
- pause
复制代码 |
|