pierlo Posted November 14, 2006 Share Posted November 14, 2006 Hallo all, this is my first post.I looked allover the place for someone else's submission regarding this topic but i haven't found any. So here's my suggestion to automate Firefox Http Proxy settings.The basics:This is the first time you launch FirefoxWe wait untile the profile folder is createdWe find the random string id for your current profileWe copy the prefs.js file containing the settings we needAnd here comes the (not bulletproof yet) code:Run(@ProgramFilesDir & "\Mozilla Firefox\firefox.exe") Sleep(15000) ; so that if it's the first time the program is executed, we wait untile the profile folder is created ;~ Read from Firefox's profile file where is the current user's preferences file stored ;~ Path=Profiles/h93zdl03.default $line = FileReadLine(@AppDataDir & "\Mozilla\Firefox\profiles.ini", 7) ; line 7 contains the random string associated with the profile ;~ and save it to $path $path = StringTrimLeft($line, 14) $from = "prefs.js" ; file with desired settings taken from a profile $to = @AppDataDir & "\Mozilla\Firefox\Profiles\" & $path & "\prefs.js" ;~ Copy the INGV prefs.js (same level as this script) to the user's profile folder FileCopy($from, $to, 1) ;~ Done! ExitFeel free to suggest better lines.... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now