@echo off
title Set Mozilla Firefox Proxy
:start
cls
echo.****************************************************************************
echo [0] Stop Proxy
echo [1] Use Proxy
echo [q] Quit
echo.****************************************************************************
set /p choice=Please Choose:
if /i "%choice%"=="0" goto SP
if /i "%choice%"=="1" goto Proxy
if /i "%choice%"=="q" goto end
:Proxy
cls
echo Please wait.....It will be configured automatically when finished......
cd /D "%APPDATA%\Mozilla\Firefox\Profiles"
cd *.default
set ffile=%cd%
IF EXIST "%ffile%\prefs.js_backup" goto end
copy /y "%ffile%\prefs.js" "%ffile%\prefs.js_backup"
echo user_pref("network.proxy.http", "代理服务器ip");>>"%ffile%\prefs.js"
echo user_pref("network.proxy.http_port", 端口);>>"%ffile%\prefs.js"
echo user_pref("network.proxy.type", 1);>>"%ffile%\prefs.js"
set ffile=
echo Press any key to return
rem pause>nul
goto end
:SP
cls
echo Please wait.....It will be closed automatically when finished......
cd /D "%APPDATA%\Mozilla\Firefox\Profiles"
cd *.default
set ffile=%cd%
move /y "%ffile%\prefs.js_backup" "%ffile%\prefs.js"
echo The Proxy has been stopped
echo Press any key to return
rem pause>nul
goto end
:end
exit
[ Last edited by www0com0my on 2009-9-20 at 09:57 ]