Script: Removing Proxy from Firefox User prefs.js

So, I was tasked with removing proxy settings from Firefox because of Webroot Desktop Proxy.  Removing them from the %Programfiles% directory was easy, the hard part was the user prefs.js.  Anyways, here’s a little script I created to remove Proxy settings and set them to No Proxy.

cd /D “%APPDATA%\Mozilla\Firefox\Profiles\”
cd *.default
set ffile=%cd%
type “%ffile%\prefs.js” | findstr /v “user_pref(“network.proxy.type”, 2);”>”%ffile%\prefs_.js”
type “%ffile%\prefs.js” | findstr /v “user_pref(“network.proxy.type”, 0);”>”%ffile%\prefs_.js”
ren “prefs.js” “prefs_.js”
del “%ffile%\prefs.js”
ren “prefs_.js” “prefs.js”
del “%ffile%\prefs_.js”
echo user_pref(“network.proxy.type”, 0);>>”%ffile%\prefs.js”
set ffile=
cd %windir%

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s