使用代理停用代理.bat

@echo off
title 速配置IE代理
:start
cls
echo.
echo         請選擇需要進行的設置:
echo.
echo         1,使用代理     2,停用代理      3,刪除IE臨時文件       Q,退出
echo.
set /p choice=      請作出選擇:
if /i "%choice%"=="1" goto start1
if /i "%choice%"=="2" goto enbal
if /i "%choice%"=="3" goto deltemp
if /i "%choice%"=="Q" goto end
goto start

:start1
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /d "192.168.0.101:808" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f
echo.
echo     目前設置爲使用代理,任意鍵返回.
pause>nul
goto start

:deltemp
@ECHO OFF
echo 正在清除臨時文件,請稍等......
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.gid
del /f /s /q %systemdrive%\*.chk
del /f /s /q %systemdrive%\*.old
del /f /s /q %systemdrive%\recycled\*.*
del /f /s /q %windir%\*.bak
del /f /s /q %windir%\prefetch\*.*
rd /s /q %windir%\temp & md %windir%\temp
del /f /q %userprofile%\cookies\*.*
del /f /q %userprofile%\recent\*.*
del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"
del /f /s /q "%userprofile%\Local Settings\Temp\*.*"
del /f /s /q "%userprofile%\recent\*.*"
pause>nul
goto start


:enbal
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f
echo.
echo     目前設置爲停用代理,任意鍵返回.
pause>nul
goto start

:end
exit

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章